Yoast\WP\SEO\Values\OAuth
OAuth_Token::__construct()
OAuth_Token constructor.
Метод класса: OAuth_Token{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$OAuth_Token = new OAuth_Token(); $OAuth_Token->__construct( $access_token, $refresh_token, $expires, $has_expired, $created_at, $error_count );
- $access_token(строка) (обязательный)
- The access token.
- $refresh_token(строка) (обязательный)
- The refresh token.
- $expires(int) (обязательный)
- The date and time at which the token will expire.
- $has_expired(true|false) (обязательный)
- Whether or not the token has expired.
- $created_at(int) (обязательный)
- The timestamp of when the token was created.
- $error_count(int)
- The number of times we've gotten an error trying to refresh this token.
Код OAuth_Token::__construct() OAuth Token:: construct Yoast 24.9
public function __construct( $access_token, $refresh_token, $expires, $has_expired, $created_at, $error_count = 0 ) { if ( empty( $access_token ) ) { throw new Empty_Property_Exception( 'access_token' ); } $this->access_token = $access_token; if ( empty( $refresh_token ) ) { throw new Empty_Property_Exception( 'refresh_token' ); } $this->refresh_token = $refresh_token; if ( empty( $expires ) ) { throw new Empty_Property_Exception( 'expires' ); } $this->expires = $expires; if ( $has_expired === null ) { throw new Empty_Property_Exception( 'has_expired' ); } $this->has_expired = $has_expired; $this->created_at = $created_at; $this->error_count = $error_count; }