public function setHttpMethod($method)
    {
        $method = strtoupper( (string) $method);

        if ( ! in_array($method, $this->allowedHttpMethods)) {

            throw new InvalidArgumentException("Invalid HTTP method: '{$method}'");
        }

        $this->setAttribute('http_method', $method);

        return $this;
    }
public function setHttpMethod($method)
    {
        $method = strtoupper( (string) $method);

        if ( ! in_array($method, $this->allowedHttpMethods)) {

            throw new InvalidArgumentException("Invalid HTTP method: '{$method}'");
        }

        $this->setAttribute('http_method', $method);

        return $this;
    }
public function setHttpMethod ( $ method ) { $ method = strtoupper ( ( string ) $ method ) ; if ( ! in_array ( $ method , $ this -> allowedHttpMethods ) ) { throw new InvalidArgumentException ( "Invalid HTTP method: '{$method}'" ) ; } $ this -> setAttribute ( 'http_method' , $ method ) ; return $ this ; }
Sets the HTTP method name

@param string $method
@return $this
Sets the HTTP method name