web/lib/Zend/Oauth/Token.php
changeset 807 877f952ae2bd
parent 207 621fa6caec0c
child 1230 68c69c656a2c
equal deleted inserted replaced
805:5e7a0fedabdf 807:877f952ae2bd
    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-2010 Zend Technologies USA Inc. (http://www.zend.com)
    17  * @copyright  Copyright (c) 2005-2012 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: Token.php 22662 2010-07-24 17:37:36Z mabe $
    19  * @version    $Id: Token.php 24593 2012-01-05 20:35:02Z matthew $
    20  */
    20  */
    21 
    21 
    22 /** Zend_Oauth_Http_Utility */
    22 /** Zend_Oauth_Http_Utility */
    23 require_once 'Zend/Oauth/Http/Utility.php';
    23 require_once 'Zend/Oauth/Http/Utility.php';
    24 
    24 
    25 /**
    25 /**
    26  * @category   Zend
    26  * @category   Zend
    27  * @package    Zend_Oauth
    27  * @package    Zend_Oauth
    28  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    28  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    29  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    29  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    30  */
    30  */
    31 abstract class Zend_Oauth_Token
    31 abstract class Zend_Oauth_Token
    32 {
    32 {
    33     /**@+
    33     /**@+
    38     const TOKEN_PARAM_CALLBACK_CONFIRMED = 'oauth_callback_confirmed';
    38     const TOKEN_PARAM_CALLBACK_CONFIRMED = 'oauth_callback_confirmed';
    39     /**@-*/
    39     /**@-*/
    40 
    40 
    41     /**
    41     /**
    42      * Token parameters
    42      * Token parameters
    43      * 
    43      *
    44      * @var array
    44      * @var array
    45      */
    45      */
    46     protected $_params = array();
    46     protected $_params = array();
    47 
    47 
    48     /**
    48     /**
    49      * OAuth response object
    49      * OAuth response object
    50      * 
    50      *
    51      * @var Zend_Http_Response
    51      * @var Zend_Http_Response
    52      */
    52      */
    53     protected $_response = null;
    53     protected $_response = null;
    54 
    54 
    55     /**
    55     /**
   262             $pair = explode('=', $kvpair);
   262             $pair = explode('=', $kvpair);
   263             $params[rawurldecode($pair[0])] = rawurldecode($pair[1]);
   263             $params[rawurldecode($pair[0])] = rawurldecode($pair[1]);
   264         }
   264         }
   265         return $params;
   265         return $params;
   266     }
   266     }
   267     
   267 
   268     /**
   268     /**
   269      * Limit serialisation stored data to the parameters
   269      * Limit serialisation stored data to the parameters
   270      */
   270      */
   271     public function __sleep() 
   271     public function __sleep()
   272     {
   272     {
   273         return array('_params');
   273         return array('_params');
   274     }
   274     }
   275 
   275 
   276     /**
   276     /**
   277      * After serialisation, re-instantiate a HTTP utility class for use
   277      * After serialisation, re-instantiate a HTTP utility class for use
   278      */
   278      */
   279     public function __wakeup() 
   279     public function __wakeup()
   280     {
   280     {
   281         if ($this->_httpUtility === null) {
   281         if ($this->_httpUtility === null) {
   282             $this->_httpUtility = new Zend_Oauth_Http_Utility;
   282             $this->_httpUtility = new Zend_Oauth_Http_Utility;
   283         }
   283         }
   284     }
   284     }