Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions | Protected Attributes
Zend_Oauth_Token_AuthorizedRequest Class Reference
Inheritance diagram for Zend_Oauth_Token_AuthorizedRequest:
Zend_Oauth_Token

Public Member Functions

 __construct (array $data=null, Zend_Oauth_Http_Utility $utility=null)
 
 getData ()
 
 isValid ()
 
- Public Member Functions inherited from Zend_Oauth_Token
 __construct (Zend_Http_Response $response=null, Zend_Oauth_Http_Utility $utility=null)
 
 isValid ()
 
 getResponse ()
 
 setTokenSecret ($secret)
 
 getTokenSecret ()
 
 setParam ($key, $value)
 
 setParams (array $params)
 
 getParam ($key)
 
 setToken ($token)
 
 getToken ()
 
 __get ($key)
 
 __set ($key, $value)
 
 toString ()
 
 __toString ()
 
 __sleep ()
 
 __wakeup ()
 

Protected Member Functions

 _parseData ()
 
- Protected Member Functions inherited from Zend_Oauth_Token
 _parseParameters (Zend_Http_Response $response)
 

Protected Attributes

 $_data = array()
 
- Protected Attributes inherited from Zend_Oauth_Token
 $_params = array()
 
 $_response = null
 
 $_httpUtility = null
 

Additional Inherited Members

- Data Fields inherited from Zend_Oauth_Token
const TOKEN_PARAM_KEY = 'oauth_token'
 
const TOKEN_SECRET_PARAM_KEY = 'oauth_token_secret'
 
const TOKEN_PARAM_CALLBACK_CONFIRMED = 'oauth_callback_confirmed'
 

Detailed Description

Definition at line 31 of file AuthorizedRequest.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( array  $data = null,
Zend_Oauth_Http_Utility  $utility = null 
)

Constructor

Parameters
null | array$data
null | Zend_Oauth_Http_Utility$utility
Returns
void

Definition at line 45 of file AuthorizedRequest.php.

46  {
47  if ($data !== null) {
48  $this->_data = $data;
49  $params = $this->_parseData();
50  if (count($params) > 0) {
51  $this->setParams($params);
52  }
53  }
54  if ($utility !== null) {
55  $this->_httpUtility = $utility;
56  } else {
57  $this->_httpUtility = new Zend_Oauth_Http_Utility;
58  }
59  }
setParams(array $params)
Definition: Token.php:157
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
Definition: website.php:18

Member Function Documentation

◆ _parseData()

_parseData ( )
protected

Parse string data into array

Returns
array

Definition at line 91 of file AuthorizedRequest.php.

92  {
93  $params = array();
94  if (empty($this->_data)) {
95  return;
96  }
97  foreach ($this->_data as $key => $value) {
98  $params[rawurldecode($key)] = rawurldecode($value);
99  }
100  return $params;
101  }
$value
Definition: gender.phtml:16
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
Definition: website.php:18

◆ getData()

getData ( )

Retrieve token data

Returns
array

Definition at line 66 of file AuthorizedRequest.php.

◆ isValid()

isValid ( )

Indicate if token is valid

Returns
bool

Definition at line 76 of file AuthorizedRequest.php.

77  {
78  if (isset($this->_params[self::TOKEN_PARAM_KEY])
79  && !empty($this->_params[self::TOKEN_PARAM_KEY])
80  ) {
81  return true;
82  }
83  return false;
84  }

Field Documentation

◆ $_data

$_data = array()
protected

Definition at line 36 of file AuthorizedRequest.php.


The documentation for this class was generated from the following file: