fabpot/Twig — Issue #484: Typo on http://twig.sensiolabs.org/doc/extensions.html page
Author: stevenjack
Created: 2011-10-25 15:15:54+00:00
State: open

on the page:

http://twig.sensiolabs.org/doc/extensions.html

under the section 'Globals and Functions' the following code generates an error:

return array(
'text' => new Text(),
'lipsum' => new Twig_Function(new Text(), 'getLipsum'),
);

stating you can't instantiate the abstract class 'Twig_Function', I solved this by using the class 'Twig_Function_Function' that extends the abstract 'Twig_Function' class.

I'm guessing this is a typo?

Thanks,

Steven