Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4149449
Response.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
Response.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
AdvancedJsonRpc
;
/**
* When a rpc call is made, the Server MUST reply with a Response, except for in the case of Notifications. The Response
* is expressed as a single JSON Object, with the following members:
*/
abstract
class
Response
extends
Message
{
/**
* This member is REQUIRED. It MUST be the same as the value of the id member in the Request Object. If there was an
* error in detecting the id in the Request object (e.g. Parse error/Invalid Request), it MUST be Null.
*
* @var int|string
*/
public
$id
;
/**
* A message is considered a Response if it has an ID and either a result or an error
*
* @param object $msg A decoded message body
* @return bool
*/
public
static
function
isResponse
(
$msg
):
bool
{
return
is_object
(
$msg
)
&&
property_exists
(
$msg
,
'id'
)
&&
(
property_exists
(
$msg
,
'result'
)
||
isset
(
$msg
->
error
));
}
/**
* @param int|string $id
* @param mixed $result
* @param ResponseError $error
*/
public
function
__construct
(
$id
)
{
$this
->
id
=
$id
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 19 2026, 19:11 (6 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
83/ef/17fe8ad94f1a17cf4cc8a2a4a0fe
Default Alt Text
Response.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment