WpOrg\Requests\Exception\Http
StatusUnknown::__construct()
Create a new exception
If $data is an instance of Response{}, uses the status code from it. Otherwise, sets as 0
Method of the class: StatusUnknown{}
No Hooks.
Return
null
. Nothing (null).
Usage
$StatusUnknown = new StatusUnknown(); $StatusUnknown->__construct( $reason, $data );
- $reason(string|null)
- Reason phrase
Default: null - $data(mixed)
- Associated data
Default: null
StatusUnknown::__construct() StatusUnknown:: construct code WP 6.6.2
public function __construct($reason = null, $data = null) { if ($data instanceof Response) { $this->code = (int) $data->status_code; } parent::__construct($reason, $data); }