Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102130203
HTTPFutureResponseStatus.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Feb 17, 09:48
Size
926 B
Mime Type
text/x-php
Expires
Wed, Feb 19, 09:48 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24288915
Attached To
rPHU libphutil
HTTPFutureResponseStatus.php
View Options
<?php
/**
* @group futures
*/
abstract
class
HTTPFutureResponseStatus
extends
Exception
{
private
$statusCode
;
private
$uri
;
public
function
__construct
(
$status_code
,
$uri
=
null
)
{
$this
->
statusCode
=
$status_code
;
$this
->
uri
=
(
string
)
$uri
;
$type
=
$this
->
getErrorCodeType
(
$status_code
);
$description
=
$this
->
getErrorCodeDescription
(
$status_code
);
$uri_info
=
''
;
if
(
$this
->
uri
)
{
$uri_info
=
' ('
.
$this
->
uri
.
')'
;
}
$message
=
rtrim
(
"[{$type}/{$status_code}]{$uri_info} {$description}"
);
parent
::
__construct
(
$message
);
}
final
public
function
getStatusCode
()
{
return
$this
->
statusCode
;
}
final
public
function
getURI
()
{
return
$this
->
uri
;
}
abstract
public
function
isError
();
abstract
public
function
isTimeout
();
abstract
protected
function
getErrorCodeType
(
$code
);
abstract
protected
function
getErrorCodeDescription
(
$code
);
}
Event Timeline
Log In to Comment