YoastSEO_Vendor\League\OAuth2\Client\Provider
GenericResourceOwner{} Yoast 1.0
Represents a generic resource owner for use with the GenericProvider.
Хуков нет.
Возвращает
Null. Ничего.
Использование
$GenericResourceOwner = new GenericResourceOwner(); // use class methods
Методы
Код GenericResourceOwner{} GenericResourceOwner{} Yoast 15.6.2
class GenericResourceOwner implements \YoastSEO_Vendor\League\OAuth2\Client\Provider\ResourceOwnerInterface
{
/**
* @var array
*/
protected $response;
/**
* @var string
*/
protected $resourceOwnerId;
/**
* @param array $response
* @param string $resourceOwnerId
*/
public function __construct(array $response, $resourceOwnerId)
{
$this->response = $response;
$this->resourceOwnerId = $resourceOwnerId;
}
/**
* Returns the identifier of the authorized resource owner.
*
* @return mixed
*/
public function getId()
{
return $this->response[$this->resourceOwnerId];
}
/**
* Returns the raw resource owner response.
*
* @return array
*/
public function toArray()
{
return $this->response;
}
}