示例#1
0
文件: Page.php 项目: hasanozgan/joy
 public static function factory($name)
 {
     $ref = new Joy_Reflection($name);
     if (!$ref->isA(Joy_Page_Interface)) {
         throw new Joy_Exception_NotFound_Page("Page Not Found ({$name})");
     }
     return $ref->newInstance();
 }
示例#2
0
 public function getController($name)
 {
     if (!$this->_controllers[$name] instanceof Joy_Controller_Interface) {
         $ref = new Joy_Reflection($name);
         if ($ref->isA(Joy_Controller_Interface)) {
             $this->_controllers[$name] = $ref->newInstance();
         }
     }
     return $this->_controllers[$name];
 }
示例#3
0
 /**
  * exists static method is check controller
  *
  * @param string $name is controller class name
  * @return boolean
  */
 public static function exists($name)
 {
     $ref = new Joy_Reflection($name);
     return $ref->isA(Joy_Controller_Interface);
 }