Ouzo\Uri::getRequestType PHP Method

getRequestType() public static method

public static getRequestType ( )
    public static function getRequestType()
    {
        return Arrays::getValue($_POST, '_method', $_SERVER['REQUEST_METHOD']);
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * @return RouteRule
  * @throws RouterException
  */
 public function findRoute()
 {
     $path = $this->uri->getPathWithoutPrefix();
     $requestType = Uri::getRequestType();
     $rule = $this->findRouteRule($path, $requestType);
     if (!$rule) {
         throw new RouterException('No route rule found for HTTP method [' . $requestType . '] and URI [' . $path . ']');
     }
     $rule->setParameters($path);
     return $rule;
 }
All Usage Examples Of Ouzo\Uri::getRequestType