Yoast\WP\SEO\Values\OAuth

OAuth_Token::from_response()public staticYoast 1.0

Creates a new instance based on the passed response.

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

Хуков нет.

Возвращает

OAuth_Token. The token object.

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

$result = OAuth_Token::from_response( $response );
$response(AccessTokenInterface) (обязательный)
The response object to create a new instance from.

Код OAuth_Token::from_response() Yoast 22.4

public static function from_response( AccessTokenInterface $response ) {
	return new self(
		$response->getToken(),
		$response->getRefreshToken(),
		$response->getExpires(),
		$response->hasExpired(),
		\time()
	);
}