示例#1
0
 /**
  *
  */
 public function determineAction()
 {
     switch ($this->controllerError) {
         case IControllerError::PAGE_NOT_FOUND:
             $this->action = "pageNotFoundAction";
             break;
         case IControllerError::METHOD_NOT_ALLOWED:
             $this->action = "methodNotAllowedAction";
             break;
         default:
             $this->action = $this->router->getAction();
     }
 }
示例#2
0
 /**
  * @param IRouter $router
  */
 public function assignExpressionValues(IRouter $router)
 {
     foreach ($router->getExpressions() as $expression) {
         if ($router->getMethod() == "GET" || $router->getMethod() == "DELETE") {
             $this->get[$expression["key"]] = $this->parseValue($expression["value"]);
         } elseif ($router->getMethod() == "POST" || $router->getMethod() == "PUT") {
             $this->post[$expression["key"]] = $this->parseValue($expression["value"]);
         }
     }
 }