Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7447592
SuccessResponse.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
SuccessResponse.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:
*/
class
SuccessResponse
extends
Response
{
/**
* This member is REQUIRED on success. This member MUST NOT exist if there was an error invoking the method. The
* value of this member is determined by the method invoked on the Server.
*
* @var mixed
*/
public
$result
;
/**
* A message is considered a SuccessResponse if it has an ID and either a result
*
* @param object $msg A decoded message body
* @return bool
*/
public
static
function
isSuccessResponse
(
$msg
):
bool
{
return
is_object
(
$msg
)
&&
property_exists
(
$msg
,
'id'
)
&&
property_exists
(
$msg
,
'result'
);
}
/**
* @param int|string $id
* @param mixed $result
*/
public
function
__construct
(
$id
,
$result
)
{
parent
::
__construct
(
$id
);
$this
->
result
=
$result
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 22, 19:13 (1 d, 11 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
83/0f/3e5c4a824ee5489c0359be806b2a
Default Alt Text
SuccessResponse.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment