Created
October 23, 2012 15:31
-
-
Save sybeck2k/3939481 to your computer and use it in GitHub Desktop.
Add Twig Debug extension in Silex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//and in your application add: | |
$app['twig'] = $app->share($app->extend('twig', function($twig, $app) { | |
$twig->addExtension(new \Twig_Extensions_Extension_Debug()); | |
return $twig; | |
})); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
//.. | |
"autoload": { | |
"psr-0": { "Twig_Extensions_": "vendor/twig/extensions/lib/" } | |
}, | |
//.. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment