public function getTwig(\Twig_Environment $twig)
    {

        $this->functions->rewind();
        while ($this->functions->valid()) {

            $function = $this->functions->current();
            $twig->addFunction(new \Twig_SimpleFunction($function->getFunctionName(), array($function, 'getFunctionBody')));
            $this->functions->next();

        }

        return $twig;

    }
public function getTwig(\Twig_Environment $twig)
    {

        $this->functions->rewind();
        while ($this->functions->valid()) {

            $function = $this->functions->current();
            $twig->addFunction(new \Twig_SimpleFunction($function->getFunctionName(), array($function, 'getFunctionBody')));
            $this->functions->next();

        }

        return $twig;

    }
public function getTwig ( \ Twig_Environment $ twig ) { $ this -> functions -> rewind ( ) ; while ( $ this -> functions -> valid ( ) ) { $ function = $ this -> functions -> current ( ) ; $ twig -> addFunction ( new \ Twig_SimpleFunction ( $ function -> getFunctionName ( ) , array ( $ function , 'getFunctionBody' ) ) ) ; $ this -> functions -> next ( ) ; } return $ twig ; }
Adds all the functions into the twig environment

@param \Twig_Environment $twig
@return \Twig_Environment
@author Tim Perry
Adds all the functions into the twig environment