Zend\Json\Server\Smd
Synopsis
class Smd
{
- // constants
- const ENV_JSONRPC_1 = 'JSON-RPC-1.0';
- const ENV_JSONRPC_2 = 'JSON-RPC-2.0';
- const SMD_VERSION = '2.0';
- // members
- protected string $contentType;
- protected string $contentTypeRegex;
- protected string $description;
- protected bool $dojoCompatible;
- protected string $envelope;
- protected array $envelopeTypes;
- protected string $id;
- protected array $services;
- protected string $target;
- protected string $transport;
- protected array $transportTypes;
- // methods
- public Smd setOptions()
- public Smd setTransport()
- public string getTransport()
- public Smd setEnvelope()
- public string getEnvelope()
- public Smd setContentType()
- public string getContentType()
- public Smd setTarget()
- public string getTarget()
- public Smd setId()
- public string getId()
- public Smd setDescription()
- public string getDescription()
- public Smd setDojoCompatible()
- public bool isDojoCompatible()
- public Smd addService()
- public Smd addServices()
- public Smd setServices()
- public Service getService()
- public array getServices()
- public bool removeService()
- public array toArray()
- public array toDojoArray()
- public string toJson()
- public string __toString()
Constants
Name | Value |
---|---|
ENV_JSONRPC_1 | 'JSON-RPC-1.0' |
ENV_JSONRPC_2 | 'JSON-RPC-2.0' |
SMD_VERSION | '2.0' |
Members
protected
- $contentType
—
string
Content type - $contentTypeRegex
—
string
Content type regex - $description
—
string
Service description - $dojoCompatible
—
Zend\Json\Server\bool
Generate Dojo-compatible SMD - $envelope
—
string
Current envelope - $envelopeTypes
—
array
Allowed envelope types - $id
—
string
Service id - $services
—
array
Services offered - $target
—
string
Service target - $transport
—
string
Global transport - $transportTypes
—
array
Allowed transport types
Methods
public
- __toString() — Cast to string (JSON)
- addService() — Add Service
- addServices() — Add many services
- getContentType() — Retrieve content type
- getDescription() — Get service description
- getEnvelope() — Retrieve envelope
- getId() — Get service id
- getService() — Get service object
- getServices() — Return services
- getTarget() — Retrieve service target
- getTransport() — Get transport
- isDojoCompatible() — Is this a Dojo compatible SMD?
- removeService() — Remove service
- setContentType() — Set content type
- setDescription() — Set service description
- setDojoCompatible() — Indicate whether or not to generate Dojo-compatible SMD
- setEnvelope() — Set envelope
- setId() — Set service ID
- setOptions() — Set object state via options
- setServices() — Overwrite existing services with new ones
- setTarget() — Set service target
- setTransport() — Set transport
- toArray() — Cast to array
- toDojoArray() — Export to DOJO-compatible SMD array
- toJson() — Cast to JSON