From e018e6ce447549296cdd29f144e5aa55c369a70a Mon Sep 17 00:00:00 2001 From: Brikou CARRE Date: Sun, 22 May 2011 09:13:03 +0200 Subject: [PATCH] added missing method's docblock --- .../Component/HttpFoundation/Request.php | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index 2192818758..32e45f4a54 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -326,6 +326,11 @@ class Request return $this->query->get($key, $this->attributes->get($key, $this->request->get($key, $default, $deep), $deep), $deep); } + /** + * Gets the Session. + * + * @return Session|null The session + */ public function getSession() { return $this->session; @@ -353,6 +358,11 @@ class Request return null !== $this->session; } + /** + * Sets the Session. + * + * @param Session $session The Session + */ public function setSession(Session $session) { $this->session = $session; @@ -449,11 +459,21 @@ class Request return $this->baseUrl; } + /** + * Gets the request's scheme. + * + * @return string + */ public function getScheme() { return $this->isSecure() ? 'https' : 'http'; } + /** + * Returns the port on which the request is made. + * + * @return string + */ public function getPort() { return $this->headers->get('X-Forwarded-Port') ?: $this->server->get('SERVER_PORT'); @@ -480,6 +500,11 @@ class Request return $name.':'.$port; } + /** + * Returns the requested URI. + * + * @return string + */ public function getRequestUri() { if (null === $this->requestUri) { @@ -550,6 +575,11 @@ class Request return implode('&', $parts); } + /** + * Checks whether the request is secure or not. + * + * @return Boolean + */ public function isSecure() { return ( @@ -586,6 +616,11 @@ class Request return trim($host); } + /** + * Sets the request method. + * + * @param string $method + */ public function setMethod($method) { $this->method = null; @@ -689,6 +724,11 @@ class Request $this->format = $format; } + /** + * Checks whether the method is safe or not. + * + * @return Boolean + */ public function isMethodSafe() { return in_array($this->getMethod(), array('GET', 'HEAD')); @@ -720,11 +760,21 @@ class Request return $this->content; } + /** + * Gets the Etags. + * + * @return array The entity tags + */ public function getETags() { return preg_split('/\s*,\s*/', $this->headers->get('if_none_match'), null, PREG_SPLIT_NO_EMPTY); } + /** + * Whether the cache is disabled. + * + * @return Boolean + */ public function isNoCache() { return $this->headers->hasCacheControlDirective('no-cache') || 'no-cache' == $this->headers->get('Pragma');