public function Twig_Loader_Filesystem::setPaths in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/twig/twig/lib/Twig/Loader/Filesystem.php \Twig_Loader_Filesystem::setPaths()
Sets the paths where templates are stored.
Parameters
string|array $paths A path or an array of paths where to look for templates:
string $namespace A path namespace:
1 call to Twig_Loader_Filesystem::setPaths()
- Twig_Loader_Filesystem::__construct in vendor/
twig/ twig/ lib/ Twig/ Loader/ Filesystem.php - Constructor.
File
- vendor/
twig/ twig/ lib/ Twig/ Loader/ Filesystem.php, line 68
Class
- Twig_Loader_Filesystem
- Loads template from the filesystem.
Code
public function setPaths($paths, $namespace = self::MAIN_NAMESPACE) {
if (!is_array($paths)) {
$paths = array(
$paths,
);
}
$this->paths[$namespace] = array();
foreach ($paths as $path) {
$this
->addPath($path, $namespace);
}
}