Lines Matching refs:loader
27 $loader = new \Twig\Loader\FilesystemLoader('/path/to/templates');
28 $twig = new \Twig\Environment($loader, [
32 This will create a template environment with the default settings and a loader
87 $twig = new \Twig\Environment($loader, ['debug' => true]);
178 ``\Twig\Loader\FilesystemLoader`` loads templates from the file system. This loader
182 $loader = new \Twig\Loader\FilesystemLoader($templateDir);
186 $loader = new \Twig\Loader\FilesystemLoader([$templateDir1, $templateDir2]);
195 $loader->addPath($templateDir3);
196 $loader->prependPath($templateDir4);
198 The filesystem loader also supports namespaced templates. This allows to group
205 $loader->addPath($templateDir, 'admin');
217 $loader = new \Twig\Loader\FilesystemLoader('templates', getcwd().'/..');
230 $loader = new \Twig\Loader\ArrayLoader([
233 $twig = new \Twig\Environment($loader);
237 This loader is very useful for unit testing. It can also be used for small
261 $loader = new \Twig\Loader\ChainLoader([$loader1, $loader2]);
263 $twig = new \Twig\Environment($loader);
265 When looking for a template, Twig will try each loader in turn and it will
270 ``\Twig\Loader\ChainLoader`` accepts any loader that implements
324 to make your loader faster when used with the chain loader.