mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-15 03:46:39 +00:00
first argument of Twig_Loader_Array must be an array
This commit is contained in:
+2
-2
@@ -50,9 +50,9 @@ This section gives you a brief introduction to the PHP API for Twig.
|
||||
|
||||
require_once '/path/to/vendor/autoload.php';
|
||||
|
||||
$loader = new Twig_Loader_Array(
|
||||
$loader = new Twig_Loader_Array(array(
|
||||
'index' => 'Hello {{ name }}!',
|
||||
);
|
||||
));
|
||||
$twig = new Twig_Environment($loader);
|
||||
|
||||
echo $twig->render('index', array('name' => 'Fabien'));
|
||||
|
||||
Reference in New Issue
Block a user