Zend\Json\Server\Server
Synopsis
class Server
extends AbstractServer
{
- // constants
- const VERSION_1 = '1.0';
- const VERSION_2 = '2.0';
- // members
- protected bool $returnResponse;
- protected bool $overwriteExistingMethods;
- protected Request $request;
- protected Response $response;
- protected Smd $serviceMap;
- protected array $smdMethods;
- // Inherited members from AbstractServer
- protected bool $overwriteExistingMethods;
- protected Definition $table;
- // methods
- public Server addFunction()
- public Server setClass()
- public Error fault()
- public null|Response handle()
- public void loadFunctions()
- public void setPersistence()
- public Server setRequest()
- public Request getRequest()
- public Server setResponse()
- public Response getResponse()
- public Server setReturnResponse()
- public bool getReturnResponse()
- public mixed __call()
- public Smd getServiceMap()
- protected void _addMethodServiceMap()
- protected string _fixType()
- protected array _getDefaultParams()
- private bool isAssociative()
- protected string|array _getParams()
- protected Response _getReadyResponse()
- protected string|array _getReturnType()
- protected array _getSmdMethods()
- protected void _handle()
- // Inherited methods from AbstractServer
- public void __construct()
- public Definition getFunctions()
- protected Callback _buildCallback()
- protected Definition _buildSignature()
- protected mixed _dispatch()
- protected abstract string _fixType()
Hierarchy
Extends
Tasks
Line | Task |
---|---|
101+ | Determine how to implement this |
Constants
Name | Value |
---|---|
VERSION_1 | '1.0' |
VERSION_2 | '2.0' |
Members
protected
- $overwriteExistingMethods
—
Zend\Json\Server\bool
Inherited from Zend\Server\AbstractServer - $overwriteExistingMethods — Zend\Server\bool
- $request
—
Zend\Json\Server\Request
Request object - $response
—
Zend\Json\Server\Response
Response object - $returnResponse
—
Zend\Json\Server\bool
Flag: whether or not to auto-emit the response - $serviceMap
—
Zend\Json\Server\Smd
SMD object - $smdMethods
—
array
SMD class accessors - $table — Zend\Server\Definition
Methods
private
- isAssociative() — check whether array is associative or not
protected
- _addMethodServiceMap() — Add service method to service map
- _fixType() — Translate PHP type to JSON type
- _getDefaultParams() — Get default params from signature
- _getParams() — Get method param type
- _getReadyResponse() — Set response state
- _getReturnType() — Get method return type
- _getSmdMethods() — Retrieve list of allowed SMD methods for proxying
- _handle() — Internal method for handling request
public
- __call() — Overload to accessors of SMD object
- addFunction() — Attach a function or callback to the server
- fault() — Indicate fault response
- getRequest() — Get JSON-RPC request object
- getResponse() — Get response object
- getReturnResponse() — Retrieve return response flag
- getServiceMap() — Retrieve SMD object
- handle() — Handle request
- loadFunctions() — Load function definitions
- setClass() — Register a class with the server
- setPersistence()
- setRequest() — Set request object
- setResponse() — Set response object
- setReturnResponse() — Set return response flag
Inherited from Zend\Server\AbstractServer
protected
- _buildCallback() — Build callback for method signature
- _buildSignature() — Build a method signature
- _dispatch() — Dispatch method
- _fixType() — Map PHP type to protocol type
public
- getFunctions() — Returns a list of registered methods