<?php /** * Exception for HTTP requests * * @package Requests\Exceptions */ namespace WpOrg\Requests; use Exception as PHPException; /** * Exception for HTTP requests * * @package Requests\Exceptions */ class Exception extends PHPException { /** * Type of exception * * @var string */ protected $type; /** * Data associated with the exception * * @var mixed */ protected $data; /** * Create a new exception * * @param string $message Exception message * @param string $type Exception type * @param mixed $data Associated data * @param integer $code Exception numerical code, if applicable */ public function __construct($message, $type, $data = null, $code = 0) { parent::__construct($message, $code); $this->type = $type; $this->data = $data; } /** * Like {@see \Exception::getCode()}, but a string code. * * @codeCoverageIgnore * @return string */ public function getType() { return $this->type; } /** * Gives any relevant data * * @codeCoverageIgnore * @return mixed */ public function getData() { return $this->data; } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
Auth | Folder | 0555 |
|
|
Cookie | Folder | 0555 |
|
|
Exception | Folder | 0555 |
|
|
Proxy | Folder | 0555 |
|
|
Response | Folder | 0555 |
|
|
Transport | Folder | 0555 |
|
|
Utility | Folder | 0555 |
|
|
Auth.php | File | 860 B | 0644 |
|
Autoload.php | File | 9.12 KB | 0644 |
|
Capability.php | File | 652 B | 0644 |
|
Cookie.php | File | 15.03 KB | 0644 |
|
Exception.php | File | 1.09 KB | 0644 |
|
HookManager.php | File | 709 B | 0644 |
|
Hooks.php | File | 2.96 KB | 0644 |
|
IdnaEncoder.php | File | 12.14 KB | 0644 |
|
Ipv6.php | File | 5.51 KB | 0644 |
|
Iri.php | File | 28.93 KB | 0644 |
|
Port.php | File | 1.47 KB | 0644 |
|
Proxy.php | File | 867 B | 0644 |
|
Requests.php | File | 33.2 KB | 0644 |
|
Response.php | File | 4.18 KB | 0644 |
|
Session.php | File | 8.89 KB | 0644 |
|
Ssl.php | File | 5.3 KB | 0644 |
|
Transport.php | File | 1.51 KB | 0644 |
|