|
@@ -238,6 +238,11 @@ class Request
|
|
|
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');
|
|
@@ -300,6 +305,12 @@ class Request
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public function setMethod($method)
|
|
|
+ {
|
|
|
+ $this->method = null;
|
|
|
+ $this->server->set('REQUEST_METHOD', 'GET');
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Gets the request method.
|
|
|
*
|