~ubuntu-branches/ubuntu/utopic/zendframework/utopic

« back to all changes in this revision

Viewing changes to library/Zend/Oauth/Client.php

  • Committer: Bazaar Package Importer
  • Author(s): Frank Habermann
  • Date: 2010-04-28 20:10:00 UTC
  • mfrom: (1.3.1 upstream) (9.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100428201000-o347bj5qb5i3tpot
Tags: 1.10.4-1
new upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 * @package    Zend_Oauth
17
17
 * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
18
18
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
19
 
 * @version    $Id: Client.php 20232 2010-01-12 17:56:33Z matthew $
 
19
 * @version    $Id: Client.php 21071 2010-02-16 14:35:00Z padraic $
20
20
 */
21
21
 
22
22
/** Zend_Oauth */
92
92
            $this->setRequestMethod(self::GET);
93
93
        } elseif($method == self::POST) {
94
94
            $this->setRequestMethod(self::POST);
 
95
        } elseif($method == self::PUT) {
 
96
            $this->setRequestMethod(self::PUT);
 
97
        }  elseif($method == self::DELETE) {
 
98
            $this->setRequestMethod(self::DELETE);
 
99
        }   elseif($method == self::HEAD) {
 
100
            $this->setRequestMethod(self::HEAD);
95
101
        }
96
102
        return parent::setMethod($method);
97
103
    }
161
167
            $this->setRawData($raw);
162
168
            $this->paramsPost = array();
163
169
        } elseif ($requestScheme == Zend_Oauth::REQUEST_SCHEME_QUERYSTRING) {
164
 
            $this->getUri()->setQuery('');
 
170
            $params = array();
 
171
            $query = $this->getUri()->getQuery();
 
172
            if ($query) {
 
173
                $queryParts = split('&', $this->getUri()->getQuery());
 
174
                foreach ($queryParts as $queryPart) {
 
175
                    $kvTuple = split('=', $queryPart);
 
176
                    $params[$kvTuple[0]] = 
 
177
                        (array_key_exists(1, $kvTuple) ? $kvTuple[1] : NULL);
 
178
                }
 
179
            }
 
180
 
165
181
            $query = $this->getToken()->toQueryString(
166
 
                $this->getUri(true), $this->_config, $this->paramsGet
 
182
                $this->getUri(true), $this->_config, $params
167
183
            );
168
184
            $this->getUri()->setQuery($query);
169
185
            $this->paramsGet = array();