/**
  * Resolve template path.
  * @return string
  */
 public function path()
 {
     if (is_null($this->folder)) {
         $path = $this->engine->getDirectory() . DIRECTORY_SEPARATOR . $this->file;
     } else {
         $path = $this->folder->getPath() . DIRECTORY_SEPARATOR . $this->file;
         if (!is_file($path) and $this->folder->getFallback() and is_file($this->engine->getDirectory() . DIRECTORY_SEPARATOR . $this->file)) {
             $path = $this->engine->getDirectory() . DIRECTORY_SEPARATOR . $this->file;
         }
     }
     if (!is_null($this->engine->getFileExtension())) {
         $path .= '.' . $this->engine->getFileExtension();
     }
     return $path;
 }
Beispiel #2
0
 /**
  * Resolve template path.
  * @return string
  */
 public function getPath()
 {
     if (is_null($this->folder)) {
         return $this->getDefaultDirectory() . DIRECTORY_SEPARATOR . $this->file;
     }
     $path = $this->folder->getPath() . DIRECTORY_SEPARATOR . $this->file;
     if (!is_file($path) and $this->folder->getFallback() and is_file($this->getDefaultDirectory() . DIRECTORY_SEPARATOR . $this->file)) {
         $path = $this->getDefaultDirectory() . DIRECTORY_SEPARATOR . $this->file;
     }
     return $path;
 }