Esempio n. 1
0
 /**
  * Fetch the given template using the resource's view resolver.
  * 
  * @param string $name
  * @param string $source
  * @param int    $mtime
  */
 public function fetch($name, &$source, &$mtime)
 {
     if ($path = $this->resolver->resolve($name)) {
         $source = file_get_contents($path);
         $mtime = filemtime($path);
     }
 }
Esempio n. 2
0
 /**
  * Attempt to resolve the given view path to a file path using the view's
  * resolver or that class's shared resolver.
  * 
  * @param string $path
  * @return string
  */
 protected function resolve($path)
 {
     if ($this->resolver) {
         return $this->resolver->resolve($path);
     } else {
         if (static::$sharedResolver) {
             return static::$sharedResolver->resolve($path);
         }
     }
     return null;
 }