Exemple #1
0
 function __construct($controller, $action, $params = [])
 {
     if (!empty($controller)) {
         $this->controller = $controller;
     }
     if ($this->controller === 'Admin\\') {
         $this->admin = true;
     }
     if (!empty($action)) {
         $this->action = $action;
     }
     $binding = new Extract();
     $binding->regMethod();
 }
Exemple #2
0
 public function run()
 {
     $config = new \Config\Route();
     $config->runs();
     if (!$config->getCustomRoute()) {
         $this->setController();
         $binding = new Extract();
         $binding->regMethod();
         if ($binding->regMethod()) {
             $con = 'BindingModels\\' . $this->action;
             $con = new $con();
             $this->params[] = $con;
         } else {
             $this->params = [];
         }
         call_user_func_array(array($this->classController, $this->action), $this->params);
     }
 }