private function setMethod($method) { if ($method != 'GET' && $method != 'POST' && $method != 'DELETE') { throw new Exception\RequestException('Invalid request method.'); } $this->method = $method; }