WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
класс не описан

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

Методы

  1. __construct(array $response, $resourceOwnerId)
  2. getId()
  3. toArray()

Код GenericResourceOwner{} Yoast 15.6.2

<?php
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;
    }
}