category | Zend |
---|---|
package | Zend_Rest |
subpackage | Server |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
__construct()
addFunction(string $function, string $namespace = ''
)
Namespacing is primarily for xmlrpc, but may be used with other implementations to prevent naming collisions.
inherited_from | \Zend_Server_Interface::addFunction() |
---|
string
Function Name
string
Function namespace (unused)
fault($exception= null
, integer $code= null
) : \DOMDocument
Creates XML error response, returning DOMDocument with response.
inherited_from | \Zend_Server_Interface::fault() |
---|
integer
Error Code
\DOMDocument
getEncoding() : string
string
getFunctions() : array
Returns a server definition array as created using *. Can be used for server introspection, documentation, or persistence.
inherited_from | \Zend_Server_Interface::getFunctions() |
---|
array
An array of Zend_Server_Reflection_Method'sgetHeaders() : array
array
handle(array $request = false
) : string | void
Requests may be passed in, or the server may automagically determine the request based on defaults. Dispatches server request to appropriate method and returns a response
inherited_from | \Zend_Server_Interface::handle() |
---|
array
\Zend_Rest_Server_Exception |
---|
string
void
loadFunctions(array $functions)
Used for persistence; loads a construct as returned by \getFunctions().
todo | Implement |
---|---|
inherited_from | \Zend_Server_Interface::loadFunctions() |
array
lowerCase(string $value, string $key) : string
Lowercase's a string by reference
string
string
string
Lower cased stringreturnResponse(boolean $flag = null
) : boolean | \Zend_Rest_Server
If called without arguments, returns the value of the flag. If called with an argument, sets the flag.
When 'return response' is true, \handle() will not send output, but will instead return the response from the dispatched function/method.
boolean
boolean
\Zend_Rest_Server
Returns Zend_Rest_Server when used to set the flag; returns boolean flag value otherwise.setClass(string $classname, string $namespace= ''
, array $argv= array()
)
The individual implementations should probably allow passing a variable number of arguments in, so that developers may define custom runtime arguments to pass to server methods.
Namespacing is primarily for xmlrpc, but could be used for other implementations as well.
inherited_from | \Zend_Server_Interface::setClass() |
---|
string
Class name
string
Class namespace (unused)
array
An array of Constructor Arguments
setEncoding(string $encoding) : \Zend_Rest_Server
string
\Zend_Rest_Server
setPersistence(integer $mode)
todo | Implement |
---|---|
inherited_from | \Zend_Server_Interface::setPersistence() |
integer
_callObjectMethod(string $class, array $args) : mixed
string
array
\Zend_Rest_Server_Exception |
For invalid class name |
---|
mixed
_callStaticMethod(string $class, array $args) : mixed
string
array
mixed
_handleScalar(string|integer|boolean $value) : string
string
integer
boolean
Result value
string
XML Response_handleStruct(array|object $struct) : string
array
object
Result Value
string
XML Response_structValue(mixed $struct, \DOMDocument $dom, \DOMElement $parent) : void
Recursively iterates through an associative array or object's properties to build XML response.
mixed
\DOMDocument
\DOMElement
$_args : array
array()
$_encoding : string
'UTF-8'
$_functions : array
array()
$_headers : array
array()
$_method : string
$_reflection : \Zend_Server_Reflection
null
$_returnResponse : boolean
false
$magicMethods : array
array('__construct', '__destruct', '__get', '__set', '__call', '__sleep', '__wakeup', '__isset', '__unset', '__tostring', '__clone', '__set_state')