Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F95687939
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
Wed, Dec 18, 09:40
Size
926 B
Mime Type
text/x-php
Expires
Fri, Dec 20, 09:40 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
23041465
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