Requests_Exception_HTTP_Unknown::__construct() public WP 1.0
Create a new exception
If $data is an instance of Requests_Response{}, uses the status code from it. Otherwise, sets as 0
{} It's a method of the class: Requests_Exception_HTTP_Unknown{}
No Hooks.
Return
Null. Nothing.
Usage
$Requests_Exception_HTTP_Unknown = new Requests_Exception_HTTP_Unknown(); $Requests_Exception_HTTP_Unknown->__construct( $reason, $data );
- $reason(string/null)
- Reason phrase
Default: null - $data(mixed)
- Associated data
Default: null
Code of Requests_Exception_HTTP_Unknown::__construct() Requests Exception HTTP Unknown:: construct WP 5.6
public function __construct($reason = null, $data = null) {
if ($data instanceof Requests_Response) {
$this->code = $data->status_code;
}
parent::__construct($reason, $data);
}