web/lib/Zend/Oauth/Client.php
changeset 1230 68c69c656a2c
parent 807 877f952ae2bd
equal deleted inserted replaced
1229:5a6b6e770365 1230:68c69c656a2c
    12  * obtain it through the world-wide-web, please send an email
    12  * obtain it through the world-wide-web, please send an email
    13  * to license@zend.com so we can send you a copy immediately.
    13  * to license@zend.com so we can send you a copy immediately.
    14  *
    14  *
    15  * @category   Zend
    15  * @category   Zend
    16  * @package    Zend_Oauth
    16  * @package    Zend_Oauth
    17  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    17  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
    18  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    18  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    19  * @version    $Id: Client.php 25167 2012-12-19 16:28:01Z matthew $
    19  * @version    $Id$
    20  */
    20  */
    21 
    21 
    22 /** Zend_Oauth */
    22 /** Zend_Oauth */
    23 require_once 'Zend/Oauth.php';
    23 require_once 'Zend/Oauth.php';
    24 
    24 
    32 require_once 'Zend/Oauth/Config.php';
    32 require_once 'Zend/Oauth/Config.php';
    33 
    33 
    34 /**
    34 /**
    35  * @category   Zend
    35  * @category   Zend
    36  * @package    Zend_Oauth
    36  * @package    Zend_Oauth
    37  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    37  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
    38  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    38  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    39  */
    39  */
    40 class Zend_Oauth_Client extends Zend_Http_Client
    40 class Zend_Oauth_Client extends Zend_Http_Client
    41 {
    41 {
    42     /**
    42     /**
   290         }
   290         }
   291     }
   291     }
   292 
   292 
   293     /**
   293     /**
   294      * Collect all signable parameters into a single array across query string
   294      * Collect all signable parameters into a single array across query string
   295      * and POST body. These are returned as a properly formatted single
   295      * and POST body. Don't include POST parameters if content type is multipart POST.
   296      * query string.
   296      *
   297      *
   297      * @return array
   298      * @return string
       
   299      */
   298      */
   300     protected function _getSignableParametersAsQueryString()
   299     protected function _getSignableParametersAsQueryString()
   301     {
   300     {
   302         $params = array();
   301         $params = array();
   303             if (!empty($this->paramsGet)) {
   302         if (!empty($this->paramsGet)) {
   304                 $params = array_merge($params, $this->paramsGet);
   303             $params = array_merge($params, $this->paramsGet);
   305                 $query  = $this->getToken()->toQueryString(
   304         }
   306                     $this->getUri(true), $this->_config, $params
   305         if ($this->enctype != self::ENC_FORMDATA && !empty($this->paramsPost)) {
   307                 );
   306             $params = array_merge($params, $this->paramsPost);
   308             }
   307         }
   309             if (!empty($this->paramsPost)) {
   308         return $params;
   310                 $params = array_merge($params, $this->paramsPost);
       
   311                 $query  = $this->getToken()->toQueryString(
       
   312                     $this->getUri(true), $this->_config, $params
       
   313                 );
       
   314             }
       
   315             return $params;
       
   316     }
   309     }
   317 
   310 
   318     /**
   311     /**
   319      * Simple Proxy to the current Zend_Oauth_Config method. It's that instance
   312      * Simple Proxy to the current Zend_Oauth_Config method. It's that instance
   320      * which holds all configuration methods and values this object also presents
   313      * which holds all configuration methods and values this object also presents