Yoast\WP\SEO\AI_Authorization\Domain
Token{}
Устарела с версии 28.4. Больше не поддерживается и может быть удалена. Рекомендуется заменить эту функцию на аналог.
Class Token Represents a token used for authentication with the AI Generator API.
Хуков нет.
Использование
$Token = new Token(); // use class methods
Методы
- public __construct( string $value, int $expiration )
- public get_value()
- public is_expired()
- public _deprecated_function( __METHOD__, 'Yoast SEO 28.4' )
- ERROR: no method name found on line `*`
- ERROR: no method name found on line `/**`
Список изменений
| Устарела с | 28.4 |
Код Token{} Token{} Yoast 28.7
class Token {
/**
* The token value.
*
* @var string
*/
private $value;
/**
* The expiration time.
*
* @var int
*/
private $expiration;
/**
* Token constructor.
*
* @deprecated 28.4
* @codeCoverageIgnore
*
* @param string $value The token value.
* @param int $expiration The expiration time.
*/
public function __construct( string $value, int $expiration ) {
\_deprecated_function( __METHOD__, 'Yoast SEO 28.4' );
$this->value = $value;
$this->expiration = $expiration;
}
/**
* Get the token value.
*
* @deprecated 28.4
* @codeCoverageIgnore
*
* @return string The token value.
*/
public function get_value(): string {
\_deprecated_function( __METHOD__, 'Yoast SEO 28.4' );
return $this->value;
}
/**
* Whether the token is expired.
*
* @deprecated 28.4
* @codeCoverageIgnore
*
* @return bool True if the token is expired, false otherwise.
*/
public function is_expired(): bool {
\_deprecated_function( __METHOD__, 'Yoast SEO 28.4' );
return $this->expiration < \time();
}
}