public function __construct() { parent::__construct(); if ($this->scaffold === null) { foreach ($this->scaffoldActions as $action) { $method = new ReflectionMethod(get_class($this), $action); if ($method->getDeclaringClass()->getName() == __CLASS__) { $this->hiddenActions[] = $action; } } } }
public function dispatch() { try { $map = (include ROOT_DIR . '/conf/routes.php'); SRoutes::initialize($map); SLocale::initialize(); $request = new SRequest(); $response = new SResponse(); if (file_exists($path = APP_DIR . '/controllers/application_controller.php')) { require_once $path; } if (file_exists($path = APP_DIR . '/helpers/application_helper.php')) { require_once $path; } SActionController::factory(SRoutes::recognize($request), $response)->out(); } catch (Exception $e) { SActionController::processWithException($request, $response, $e)->out(); } }
public static function processWithException($request, $response, $exception) { $controller = new SActionController(); return $controller->process($request, $response, 'rescueAction', $exception); }
public function __construct() { parent::__construct(); $this->aroundFilters[] = new AroundFilter(); }