Voodoo\Core\Http\Request::is PHP Méthode

is() public static méthode

To check the request Method
public static is ( string $method = "POST" )
$method string
    public static function is($method = "POST")
    {
        return strtolower(self::getMethod()) === strtolower($method);
    }

Usage Example

Exemple #1
0
 /**
  * Bool if the request method is a GET
  * @return bool
  */
 public function isGet()
 {
     return Http\Request::is("GET");
 }