Yoast\WP\SEO\Values\SEMrush
SEMrush_Token::__construct() public Yoast 1.0
SEMrush_Token constructor.
{} Это метод класса: SEMrush_Token{}
Хуков нет.
Возвращает
Null. Ничего.
Использование
$SEMrush_Token = new SEMrush_Token(); $SEMrush_Token->__construct( $access_token, $refresh_token, $expires, $has_expired, $created_at );
- $access_token(строка) (обязательный)
- The access token.
- $refresh_token(строка) (обязательный)
- The refresh token.
- $expires(число) (обязательный)
- The date and time at which the token will expire.
- $has_expired(true/false) (обязательный)
- Whether or not the token has expired.
- $created_at(число) (обязательный)
- The timestamp of when the token was created.
Код SEMrush_Token::__construct() SEMrush Token:: construct Yoast 15.6.2
public function __construct( $access_token, $refresh_token, $expires, $has_expired, $created_at ) {
if ( empty( $access_token ) ) {
throw new Empty_Property_Exception( 'access_token' );
}
$this->access_token = $access_token;
if ( empty( $access_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 ( \is_null( $has_expired ) ) {
throw new Empty_Property_Exception( 'has_expired' );
}
$this->has_expired = $has_expired;
$this->created_at = $created_at;
}