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(); }
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]; }
/** * 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); }