Example #1
0
 /**
  * Get the full server path to the view file backing this
  * view object.
  *
  * @return String The full server path
  */
 protected function getPath()
 {
     $path = $this->provider->getPath() . '/View';
     $old_path = $this->provider->getPath() . '/views';
     foreach (array($path, $old_path) as $path) {
         if (file_exists($path . '/' . $this->path . '.php')) {
             return $path . '/' . $this->path . '.php';
         }
     }
     throw new \Exception('View file not found: ' . htmlentities($this->path));
 }
Example #2
0
 /**
  * Is a given provider an addon?
  *
  * @return bool Is an addon?
  */
 protected function isAddon(Provider $provider)
 {
     $path = $provider->getPath();
     return strpos($path, PATH_ADDONS) === 0 || strpos($path, PATH_THIRD) === 0;
 }