todo |
Revised method regex to allow NS; however, should SMD be revised to strip PHP NS instead when attaching functions? |
Methods
Constructor
__construct(string | array $spec)
Parameters
$spec
stringarray
Exceptions
Cast to string
__toString() : string
Add a parameter to the service
addParam(string | array $type, array $options, int | null $order) : \Zend\Json\Server\Smd\Service
Parameters
$type
stringarray
$options
array
$order
intnull
Exceptions
Returns
Add params
addParams(array $params) : \Zend\Json\Server\Smd\Service
Each param should be an array, and should include the key 'type'.
Parameters
$params
array
Returns
Get envelope type
getEnvelope() : string
Retrieve name
getName() : string
Get all parameters
getParams() : array
Returns all params in specified order.
Returns
array
Get return type
getReturn() : string | array
Get service target
getTarget() : string
Get transport
getTransport() : string
Set Transport
setTransport(string $transport) : \Zend\Json\Server\Smd\Service
Currently limited to POST
Parameters
$transport
string
Exceptions
Returns
Cast service description to array
toArray() : array
Return JSON encoding of service
toJson() : string
Validate parameter type
_validateParamType(string $type, bool $isReturn) : string
Parameters
$type
string
$isReturn
bool
Exceptions
Returns
string
Properties
Allowed envelope types
$envelopeTypes : array
Regex for names
$nameRegex : string
Mapping of parameter types to JSON-RPC types
$paramMap : array
Parameter option types
$paramOptionTypes : array
Service params
$params : array
Allowed transport types
$transportTypes : array