public function setMethod($method) {
        $method = (int) $method;
        switch ($this->method) {
            case self::METHOD_AUTO:
            case self::METHOD_GET:
            case self::METHOD_POST:
                $this->method = $method;
                break;
            default:
                throw new InvalidArgumentException();
        }
    }
public function setMethod($method) {
        $method = (int) $method;
        switch ($this->method) {
            case self::METHOD_AUTO:
            case self::METHOD_GET:
            case self::METHOD_POST:
                $this->method = $method;
                break;
            default:
                throw new InvalidArgumentException();
        }
    }
public function setMethod ( $ method ) { $ method = ( int ) $ method ; switch ( $ this -> method ) { case self :: METHOD_AUTO : case self :: METHOD_GET : case self :: METHOD_POST : $ this -> method = $ method ; break ; default : throw new InvalidArgumentException ( ) ; } }
Setter for request method
@param int $method method type code
@throws InvalidArgumentException
Setter for request method