Yoast\WP\SEO\Config

OAuth_Client::__construct()publicYoast 1.0

OAuth_Client constructor.

Метод класса: OAuth_Client{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$OAuth_Client = new OAuth_Client();
$OAuth_Client->__construct(;

Код OAuth_Client::__construct() Yoast 22.4

public function __construct(
	$token_option,
	$provider,
	Options_Helper $options_helper
) {
	$this->provider       = $provider;
	$this->token_option   = $token_option;
	$this->options_helper = $options_helper;

	$tokens = $this->options_helper->get( $this->token_option );

	if ( ! empty( $tokens ) ) {
		$this->token = new OAuth_Token(
			$tokens['access_token'],
			$tokens['refresh_token'],
			$tokens['expires'],
			$tokens['has_expired'],
			$tokens['created_at'],
			( $tokens['error_count'] ?? 0 )
		);
	}
}