API Documentation

Zend/Json/Server/Request.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Json  
Subpackage
Server  
Version
$Id: Request.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Json_Server_Request

Package: Zend\Json\Server

Children
\Zend_Json_Server_Request_Http
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotectedmixed  $_id= ''

Request ID

Details
Type
mixed
Propertyprotectedbool  $_isMethodError= 'false'

Flag

Default valuefalseDetails
Type
bool
Propertyprotectedstring  $_method= ''

Requested method

Details
Type
string
Propertyprotectedstring  $_methodRegex= ''/^[a-z][a-z0-9_.]*$/i''

Regex for method

Default value'/^[a-z][a-z0-9_.]*$/i'Details
Type
string
Propertyprotectedarray  $_params= 'array()'

Request parameters

Default valuearray()Details
Type
array
Propertyprotectedstring  $_version= ''1.0''

JSON-RPC version of request

Default value'1.0'Details
Type
string

Methods

methodpublic__toString( ) : string

Cast request to string (JSON)

Returns
Type Description
string
methodpublicaddParam( mixed $value, string $key = null ) : \Zend_Json_Server_Request

Add a parameter to the request

Parameters
Name Type Description
$value mixed
$key string
Returns
Type Description
\Zend_Json_Server_Request
methodpublicaddParams( array $params ) : \Zend_Json_Server_Request

Add many params

Parameters
Name Type Description
$params array
Returns
Type Description
\Zend_Json_Server_Request
methodpublicgetId( ) : mixed

Retrieve request identifier

Returns
Type Description
mixed
methodpublicgetMethod( ) : string

Get request method name

Returns
Type Description
string
methodpublicgetParam( int|string $index ) : mixed|null

Retrieve param by index or key

Parameters
Name Type Description
$index int|string
Returns
Type Description
mixed|null Null when not found
methodpublicgetParams( ) : array

Retrieve parameters

Returns
Type Description
array
methodpublicgetVersion( ) : string

Retrieve JSON-RPC version

Returns
Type Description
string
methodpublicisMethodError( ) : bool

Was a bad method provided?

Returns
Type Description
bool
methodpublicloadJson( string $json ) : void

Set request state based on JSON

Parameters
Name Type Description
$json string
methodpublicsetId( mixed $name ) : \Zend_Json_Server_Request

Set request identifier

Parameters
Name Type Description
$name mixed
Returns
Type Description
\Zend_Json_Server_Request
methodpublicsetMethod( string $name ) : \Zend_Json_Server_Request

Set request method

Parameters
Name Type Description
$name string
Returns
Type Description
\Zend_Json_Server_Request
methodpublicsetOptions( array $options ) : \Zend_Json_Server_Request

Set request state

Parameters
Name Type Description
$options array
Returns
Type Description
\Zend_Json_Server_Request
methodpublicsetParams( array $params ) : \Zend_Json_Server_Request

Overwrite params

Parameters
Name Type Description
$params array
Returns
Type Description
\Zend_Json_Server_Request
methodpublicsetVersion( string $version ) : \Zend_Json_Server_Request

Set JSON-RPC version

Parameters
Name Type Description
$version string
Returns
Type Description
\Zend_Json_Server_Request
methodpublictoJson( ) : string

Cast request to JSON

Returns
Type Description
string
Documentation was generated by DocBlox 0.15.1.