WpOrg\Requests\Proxy
Http::register
Register the necessary callbacks
Метод класса: Http{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$Http = new Http(); $Http->register( $hooks );
- $hooks(WpOrg\Requests\Hooks) (обязательный)
- Hook system.
Заметки
| Смотрите: \WpOrg\Requests\Proxy[Http::curl_before_send()](/function/Http::curl_before_send) |
| Смотрите: \WpOrg\Requests\Proxy[Http::fsockopen_remote_socket()](/function/Http::fsockopen_remote_socket) |
| Смотрите: \WpOrg\Requests\Proxy[Http::fsockopen_remote_host_path()](/function/Http::fsockopen_remote_host_path) |
| Смотрите: \WpOrg\Requests\Proxy[Http::fsockopen_header()](/function/Http::fsockopen_header) |
Список изменений
| С версии 1.6 | Введена. |
Код Http::register() Http::register WP 7.1.4
public function register(Hooks $hooks) {
$hooks->register('curl.before_send', [$this, 'curl_before_send']);
$hooks->register('fsockopen.remote_socket', [$this, 'fsockopen_remote_socket']);
$hooks->register('fsockopen.remote_host_path', [$this, 'fsockopen_remote_host_path']);
if ($this->use_authentication) {
$hooks->register('fsockopen.after_headers', [$this, 'fsockopen_header']);
}
}