public function Twig_Loader_Filesystem::setPaths in Translation template extractor 6.3
Same name and namespace in other branches
- 7.3 vendor/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/ Loader/ Filesystem.php - Constructor.
File
- vendor/
Twig/ Loader/ Filesystem.php, line 67
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);
}
}