Uses
| Uses | Description |
|---|---|
| wp-includes/Requests/Exception.php: Requests_Exception::__construct() | Create a new exception |
Constructor
(array|null) (Optional) Array of user and password. Must have exactly two elements
Default value: null
File: wp-includes/Requests/Proxy/HTTP.php
public function __construct($args = null) {
if (is_string($args)) {
$this->proxy = $args;
}
elseif (is_array($args)) {
if (count($args) == 1) {
list($this->proxy) = $args;
}
elseif (count($args) == 3) {
list($this->proxy, $this->user, $this->pass) = $args;
$this->use_authentication = true;
}
else {
throw new Requests_Exception('Invalid number of arguments', 'proxyhttpbadargs');
}
}
} | Version | Description |
|---|---|
| 1.6 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/requests_proxy_http/__construct