Beispiel #1
0
 /**
  * Run routes
  * @return mixed
  */
 public function execute()
 {
     $URI = $this->getRequestPath();
     $Method = Request::getMethodType();
     if ($this->routeExists($URI)) {
         if (array_key_exists($Method, $this->m_Routes[$URI])) {
             if ($this->m_Routes[$URI][$Method] instanceof Closure) {
                 return $this->m_Routes[$URI][$Method]();
             } else {
                 return $this->getController($this->m_Routes[$URI][$Method]);
             }
         }
     }
     return $this->getController($this->m_ErrorPage);
 }
Beispiel #2
0
 public function post()
 {
     echo Request::getMethodType();
     echo "POST! :D";
 }