Bluz\Proxy\Request::getMethod PHP Method

getMethod() public static method

Get method
public static getMethod ( ) : string
return string
    public static function getMethod()
    {
        return self::getParam('_method', self::getInstance()->getMethod());
    }

Usage Example

Example #1
0
 /**
  * Prepare request for processing
  */
 public function __construct()
 {
     // rewrite REST with "_method" param
     // this is workaround
     $this->method = strtoupper(Request::getParam('_method', Request::getMethod()));
     // get all params
     $query = Request::getQuery();
     if (is_array($query) && !empty($query)) {
         unset($query['_method']);
         $this->params = $query;
     }
     $this->data = Request::getParams();
 }
All Usage Examples Of Bluz\Proxy\Request::getMethod