mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 19:36:43 +00:00
added the path to cache in the doc examples
git-svn-id: http://svn.twig-project.org/trunk@15 93ef8e89-cb99-4229-a87c-7fa0fa45744b
This commit is contained in:
@@ -79,7 +79,7 @@ rendering with the `display()` method.
|
||||
Twig also comes with a filesystem loader:
|
||||
|
||||
[php]
|
||||
$loader = new Twig_Loader_Filesystem('/path/to/templates');
|
||||
$loader = new Twig_Loader_Filesystem('/path/to/templates', '/path/to/cache');
|
||||
$twig = new Twig_Environment($loader);
|
||||
|
||||
$template = $twig->loadTemplate('index.html');
|
||||
|
||||
@@ -25,7 +25,7 @@ looks roughly like this:
|
||||
require_once '/path/to/lib/Twig/Autoloader.php';
|
||||
Twig_Autoloader::register();
|
||||
|
||||
$loader = new Twig_Loader_Filesystem('/path/to/templates');
|
||||
$loader = new Twig_Loader_Filesystem('/path/to/templates', '/path/to/cache');
|
||||
$twig = new Twig_Environment($loader);
|
||||
|
||||
This will create a template environment with the default settings and a loader
|
||||
|
||||
Reference in New Issue
Block a user