Skip to content

Commit

Permalink
[RequestHandler] added getPort() and setMethod() to Request
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Apr 25, 2010
1 parent 1bce646 commit 038f7d7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Symfony/Components/RequestHandler/Request.php
Expand Up @@ -238,6 +238,11 @@ public function getScheme()
return ($this->server->get('HTTPS') == 'on') ? 'https' : 'http';
}

public function getPort()
{
return $this->server->get('SERVER_PORT');
}

public function getHttpHost()
{
$host = $this->headers->get('HOST');
Expand Down Expand Up @@ -300,6 +305,12 @@ public function getHost()
}
}

public function setMethod($method)
{
$this->method = null;
$this->server->set('REQUEST_METHOD', 'GET');
}

/**
* Gets the request method.
*
Expand Down

0 comments on commit 038f7d7

Please sign in to comment.