From fb829bdd7b31330b968d067e868d7713975d4921 Mon Sep 17 00:00:00 2001 From: mark_story Date: Thu, 20 Dec 2012 21:17:02 -0500 Subject: [PATCH] Implement more parts of the Request class. --- lib/Cake/Network/Http/Request.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/Cake/Network/Http/Request.php b/lib/Cake/Network/Http/Request.php index f8aed4d7d8d..bc34444a2c7 100644 --- a/lib/Cake/Network/Http/Request.php +++ b/lib/Cake/Network/Http/Request.php @@ -17,6 +17,9 @@ /** * Implements methods for HTTP requests. + * + * Used by Cake\Network\Http\Client to contain request information + * for making requests. */ class Request { @@ -46,6 +49,13 @@ class Request { 'User-Agent' => 'CakePHP' ]; +/** + * Get/Set the HTTP method. + * + * @param string|null $method The method for the request. + * @return mixed Either this or the current method. + * @throws Cake\Error\Exception On invalid methods. + */ public function method($method = null) { if ($method === null) { return $this->_method; @@ -58,6 +68,12 @@ public function method($method = null) { return $this; } +/** + * Get/Set the url for the request. + * + * @param string|null $url The url for the request. Leave null for get + * @return mixed Either $this or the url value. + */ public function url($url = null) { if ($url === null) { return $this->_url;