Yoast\WP\SEO\Config
Wincher_Client::__construct
Wincher_Client constructor.
Метод класса: Wincher_Client{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$Wincher_Client = new Wincher_Client(); $Wincher_Client->__construct( $options_helper, $wp_remote_handler );
- $options_helper(Options_Helper) (обязательный)
- The Options_Helper instance.
- $wp_remote_handler(WP_Remote_Handler) (обязательный)
- The request handler.
Код Wincher_Client::__construct() Wincher Client:: construct Yoast 27.3
public function __construct( Options_Helper $options_helper, WP_Remote_Handler $wp_remote_handler ) {
$provider = new Wincher_PKCE_Provider(
[
'clientId' => 'yoast',
'redirectUri' => 'https://auth.wincher.com/yoast/setup',
'urlAuthorize' => 'https://auth.wincher.com/connect/authorize',
'urlAccessToken' => 'https://auth.wincher.com/connect/token',
'urlResourceOwnerDetails' => 'https://api.wincher.com/beta/user',
'scopes' => [ 'profile', 'account', 'websites:read', 'websites:write', 'offline_access' ],
'scopeSeparator' => ' ',
'pkceMethod' => 'S256',
],
[
'httpClient' => new Client( [ 'handler' => $wp_remote_handler ] ),
],
);
parent::__construct(
self::TOKEN_OPTION,
$provider,
$options_helper,
);
}