WpOrg\Requests\Exception\Transport

Curl::__construct()publicWP 1.0

Create a new exception.

Метод класса: Curl{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$Curl = new Curl();
$Curl->__construct( $message, $type, $data, $code );
$message(строка) (обязательный)
Exception message.
$type(строка) (обязательный)
Exception type.
$data(разное)
Associated data, if applicable.
По умолчанию: null
$code(int)
Exception numerical code, if applicable.

Код Curl::__construct() WP 6.8

public function __construct($message, $type, $data = null, $code = 0) {
	if ($type !== null) {
		$this->type = $type;
	}

	if ($code !== null) {
		$this->code = (int) $code;
	}

	if ($message !== null) {
		$this->reason = $message;
	}

	$message = sprintf('%d %s', $this->code, $this->reason);
	parent::__construct($message, $this->type, $data, $this->code);
}