protected function getSforVariables(\Twig_TokenStream $stream)
    {
        $forOptions = new \Twig_Node_Expression_Array([], $stream->getCurrent()->getLine());
        $this->addKeyValues($stream, $forOptions);
        $sfor = $forOptions->getNode(1)->getAttribute('value');

        preg_match('/([\w\d\_]+) in ([\w\d\_\.\(\)\'\"]+)/', $sfor, $matches);

        if (!isset($matches[1]) || !isset($matches[2])) {
            throw new \Twig_Error_Syntax("The sfor parameter must be the pattern: '<variable> in <variables>'", $stream->getCurrent()->getLine(), $stream->getSourceContext()->getName());
        }

        return [$matches[1], $this->getSforInVariableNode($matches[2])];
    }
protected function getSforVariables(\Twig_TokenStream $stream)
    {
        $forOptions = new \Twig_Node_Expression_Array([], $stream->getCurrent()->getLine());
        $this->addKeyValues($stream, $forOptions);
        $sfor = $forOptions->getNode(1)->getAttribute('value');

        preg_match('/([\w\d\_]+) in ([\w\d\_\.\(\)\'\"]+)/', $sfor, $matches);

        if (!isset($matches[1]) || !isset($matches[2])) {
            throw new \Twig_Error_Syntax("The sfor parameter must be the pattern: '<variable> in <variables>'", $stream->getCurrent()->getLine(), $stream->getSourceContext()->getName());
        }

        return [$matches[1], $this->getSforInVariableNode($matches[2])];
    }
protected function getSforVariables ( \ Twig_TokenStream $ stream ) { $ forOptions = new \ Twig_Node_Expression_Array ( [ ] , $ stream -> getCurrent ( ) -> getLine ( ) ) ; $ this -> addKeyValues ( $ stream , $ forOptions ) ; $ sfor = $ forOptions -> getNode ( 1 ) -> getAttribute ( 'value' ) ; preg_match ( '/([\w\d\_]+) in ([\w\d\_\.\(\)\'\"]+)/' , $ sfor , $ matches ) ; if ( ! isset ( $ matches [ 1 ] ) || ! isset ( $ matches [ 2 ] ) ) { throw new \ Twig_Error_Syntax ( "The sfor parameter must be the pattern: '<variable> in <variables>'" , $ stream -> getCurrent ( ) -> getLine ( ) , $ stream -> getSourceContext ( ) -> getName ( ) ) ; } return [ $ matches [ 1 ] , $ this -> getSforInVariableNode ( $ matches [ 2 ] ) ] ; }
Get the variables defines in the Sfor attribute.

@param \Twig_TokenStream $stream

@return string[] The sfor variable names

@throws \Twig_Error_Syntax
Get the variables defines in the Sfor attribute .