예제 #1
0
 public function doAction()
 {
     if (class_exists($this->_controller)) {
         $controller = new $this->_controller(Component\AppRegistry::getRequest());
         $action = method_exists($controller, $this->_action) ? $this->_action : 'indexAction';
         $controller->{$action}($this->_params);
     } else {
         header('Location: /404');
     }
 }
예제 #2
0
 public function __construct(Request $req)
 {
     parent::__construct($req);
     $this->_model = new PostModel(AppRegistry::getConfig());
 }