Beispiel #1
0
 /**
  * Sets the request token and secret.
  *
  * The tokens can also be passed as an array into the first argument.
  * The array must have the elements token and token_secret.
  *
  * @param string|array $token
  * @param string $token_secret
  * @return void
  */
 public function setToken($token, $token_secret = null)
 {
     if (is_a($token, "Zend_Oauth_Token")) {
         if (is_a($token, "Zend_Oauth_Token_Access")) {
             $this->OAuth->setToken($token);
         }
         $this->zend_oauth_token = $token;
         return parent::setToken($token->getToken(), $token->getTokenSecret());
     } elseif (is_string($token) && is_null($token_secret)) {
         return $this->setToken(unserialize($token));
     } elseif (isset($token['zend_oauth_token'])) {
         return $this->setToken(unserialize($token['zend_oauth_token']));
     } else {
         parent::setToken($token, $token_secret);
         return;
     }
 }
Beispiel #2
0
 /**
  * Sets the request token and secret.
  *
  * The tokens can also be passed as an array into the first argument.
  * The array must have the elements token and token_secret.
  * 
  * @param string|array $token 
  * @param string $token_secret 
  * @return void
  */
 public function setToken($token, $token_secret = null)
 {
     parent::setToken($token, $token_secret);
     $this->OAuth->setToken($this->oauth_token);
     $this->OAuth->setTokenSecret($this->oauth_token_secret);
 }