File Editor
Directories:
.. (Back)
Files:
304.php
305.php
306.php
400.php
401.php
402.php
403.php
404.php
405.php
406.php
407.php
408.php
409.php
410.php
411.php
412.php
413.php
414.php
415.php
416.php
417.php
418.php
428.php
429.php
431.php
500.php
501.php
502.php
503.php
504.php
505.php
511.php
Unknown.php
Create New File
Create
Edit File: Unknown.php
<?php /** * Exception for unknown status responses * * @package Requests */ /** * Exception for unknown status responses * * @package Requests */ class Requests_Exception_HTTP_Unknown extends Requests_Exception_HTTP { /** * HTTP status code * * @var integer|bool Code if available, false if an error occurred */ protected $code = 0; /** * Reason phrase * * @var string */ protected $reason = 'Unknown'; /** * Create a new exception * * If `$data` is an instance of {@see Requests_Response}, uses the status * code from it. Otherwise, sets as 0 * * @param string|null $reason Reason phrase * @param mixed $data Associated data */ public function __construct($reason = null, $data = null) { if ($data instanceof Requests_Response) { $this->code = $data->status_code; } parent::__construct($reason, $data); } }
Save Changes
Rename File
Rename