Lines Matching refs:path
86 foreach ($paths as $path) {
87 $this->addPath($path, $namespace);
94 * @param string $path A path where to look for templates
99 public function addPath($path, $namespace = self::MAIN_NAMESPACE) argument
104 $checkPath = $this->isAbsolutePath($path) ? $path : $this->rootPath.$path;
106 … throw new LoaderError(sprintf('The "%s" directory does not exist ("%s").', $path, $checkPath));
109 $this->paths[$namespace][] = rtrim($path, '/\\');
115 * @param string $path A path where to look for templates
120 public function prependPath($path, $namespace = self::MAIN_NAMESPACE) argument
125 $checkPath = $this->isAbsolutePath($path) ? $path : $this->rootPath.$path;
127 … throw new LoaderError(sprintf('The "%s" directory does not exist ("%s").', $path, $checkPath));
130 $path = rtrim($path, '/\\');
133 $this->paths[$namespace][] = $path;
135 array_unshift($this->paths[$namespace], $path);
148 $path = $this->findTemplate($name);
150 return new Source(file_get_contents($path), $name, $path);
155 $path = $this->findTemplate($name);
157 if (0 === strncmp($this->rootPath, $path, $len)) {
158 return substr($path, $len);
161 return $path;
225 foreach ($this->paths[$namespace] as $path) {
226 if (!$this->isAbsolutePath($path)) {
227 $path = $this->rootPath.$path;
230 if (is_file($path.'/'.$shortname)) {
231 if (false !== $realpath = realpath($path.'/'.$shortname)) {
235 return $this->cache[$name] = $path.'/'.$shortname;