Zend\Json\Server\Request
Synopsis
class Request
{
- // members
- protected mixed $id;
- protected bool $isMethodError;
- protected bool $isParseError;
- protected string $method;
- protected string $methodRegex;
- protected array $params;
- protected string $version;
- // methods
- public Request setOptions()
- public Request addParam()
- public Request addParams()
- public Request setParams()
- public mixed|null getParam()
- public array getParams()
- public Request setMethod()
- public string getMethod()
- public bool isMethodError()
- public bool isParseError()
- public Request setId()
- public mixed getId()
- public Request setVersion()
- public string getVersion()
- public void loadJson()
- public string toJson()
- public string __toString()
Hierarchy
Extended by
Tasks
Line | Task |
---|---|
17+ | Revised method regex to allow NS; however, should SMD be revised to strip PHP NS instead when attaching functions? |
Members
protected
- $id
—
mixed
Request ID - $isMethodError
—
Zend\Json\Server\bool
Flag - $isParseError
—
Zend\Json\Server\bool
Flag - $method
—
string
Requested method - $methodRegex
—
string
Regex for method - $params
—
array
Request parameters - $version
—
string
JSON-RPC version of request
Methods
public
- __toString() — Cast request to string (JSON)
- addParam() — Add a parameter to the request
- addParams() — Add many params
- getId() — Retrieve request identifier
- getMethod() — Get request method name
- getParam() — Retrieve param by index or key
- getParams() — Retrieve parameters
- getVersion() — Retrieve JSON-RPC version
- isMethodError() — Was a bad method provided?
- isParseError() — Was a malformed JSON provided?
- loadJson() — Set request state based on JSON
- setId() — Set request identifier
- setMethod() — Set request method
- setOptions() — Set request state
- setParams() — Overwrite params
- setVersion() — Set JSON-RPC version
- toJson() — Cast request to JSON