コード例 #1
0
ファイル: Request.class.php プロジェクト: Superbeest/Core
 /**
  * Returns the method used.
  * A valid value from \System\HTTP\Request\Method must be used, or METHOD_GET will be returned
  * @return string The method used.
  */
 public static final function getMethod()
 {
     $handle = self::getServerHandle();
     $method = $handle['REQUEST_METHOD'];
     $val = new \System\Security\Validate();
     if ($val->inStruct($method, 'method', new \System\HTTP\Request\Method(), true) == \System\Security\ValidateResult::VALIDATE_OK) {
         return $method;
     }
     return \System\HTTP\Request\Method::METHOD_GET;
 }