Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Finished comments on OAuth_Request

  • Loading branch information...
commit 757d7442bf7d72b9fc3a1be24dfde1750daf1c9e 1 parent 27c54da
Woody Gilk authored June 26, 2010

Showing 1 changed file with 13 additions and 9 deletions. Show diff stats Hide diff stats

  1. 22  classes/oauth/request.php
22  classes/oauth/request.php
@@ -13,6 +13,8 @@ class OAuth_Request {
13 13
 	/**
14 14
 	 * Create a new request object.
15 15
 	 *
  16
+	 *     $request = OAuth_Request::factory('token', 'http://example.com/oauth/request_token');
  17
+	 *
16 18
 	 * @param   string  request type
17 19
 	 * @param   string  request URL
18 20
 	 * @param   string  request method
@@ -56,12 +58,6 @@ public static function factory($type, $method, $url = NULL, array $params = NULL
56 58
 	 */
57 59
 	protected $required = array();
58 60
 
59  
-	protected $default = array(
60  
-		'oauth_version',
61  
-		'oauth_timestamp',
62  
-		''
63  
-	);
64  
-
65 61
 	/**
66 62
 	 * @var  array  POST body
67 63
 	 */
@@ -104,7 +100,7 @@ public function __construct($method, $url, array $params = NULL)
104 100
 
105 101
 		if ($this->required('oauth_version') AND ! isset($this->params['oauth_version']))
106 102
 		{
107  
-			// Always include the OAuth version, even though it is optional
  103
+			// Set the version of this request
108 104
 			$this->params['oauth_version'] = OAuth::$version;
109 105
 		}
110 106
 
@@ -364,7 +360,15 @@ public function as_query()
364 360
 		return OAuth::normalize_params($this->params);
365 361
 	}
366 362
 
367  
-	public function as_url($value='')
  363
+	/**
  364
+	 * Return the entire request URL with the parameters as a GET string.
  365
+	 *
  366
+	 *     $url = $request->as_url();
  367
+	 *
  368
+	 * @return  string
  369
+	 * @uses    OAuth_Request::as_query
  370
+	 */
  371
+	public function as_url()
368 372
 	{
369 373
 		return $this->url.'?'.$this->as_query();
370 374
 	}
@@ -426,7 +430,7 @@ public function check()
426 430
 	 *
427 431
 	 * @param   string   request type: GET, POST, etc (NULL for header)
428 432
 	 * @param   array    additional cURL options
429  
-	 * @return  OAuth_Response
  433
+	 * @return  string   request response body
430 434
 	 * @uses    OAuth_Request::check
431 435
 	 * @uses    Arr::get
432 436
 	 * @uses    Remote::get

0 notes on commit 757d744

Please sign in to comment.
Something went wrong with that request. Please try again.