API Documentation

Rest/Client.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Rest
subpackage
Client
version
$Id: Client.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Rest_Client

Description

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.

Zend_Rest_Client

Extends from
Zend_Service_Abstract
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Rest
subpackage
Client
Properties
$_data
$_uri
Methods
__construct
setUri
getUri
_prepareRest
restGet
_performPost
restPost
restPut
restDelete
__call

Description

Properties

$_data

array $_data = 'array'

Data for the query

Details

$_data
array
visibility
protected
default
array
final
false
static
false

$_uri

Zend_Uri_Http $_uri = 'null'

Zend_Uri of this web service

Details

$_uri
Zend_Uri_Http
visibility
protected
default
null
final
false
static
false

Methods

__call

__call( string $method, array $args ) : Zend_Rest_Client_Result|Zend_Rest_Client

Method call overload

Allows calling REST actions as object methods; however, you must follow-up by chaining the request with a request to an HTTP request method (post, get, delete, put): $response = $rest->sayHello('Foo', 'Manchu')->get();

Or use them together, but in sequential calls: $rest->sayHello('Foo', 'Manchu'); $response = $rest->get();

Arguments
$method
string
Method name
$args
array
Method args
Output
Zend_Rest_Client_Result|Zend_Rest_Client
Zend_Rest_Client if using a remote method, Zend_Rest_Client_Result if using an HTTP request method
Details
visibility
public
final
false
static
false

__construct

__construct( string|Zend_Uri_Http $uri = null ) : void

Constructor

Arguments
$uri
stringZend_Uri_Http
URI for the web service
Details
visibility
public
final
false
static
false

_performPost

_performPost( mixed $method, mixed $data = null ) : Zend_Http_Response

Perform a POST or PUT

Performs a POST or PUT request. Any data provided is set in the HTTP client. String data is pushed in as raw POST data; array or object data is pushed in as POST parameters.

Arguments
$method
mixed
$data
mixed
Details
visibility
protected
final
false
static
false

_prepareRest

_prepareRest( string $path ) : void

Call a remote REST web service URI and return the Zend_Http_Response object

Arguments
$path
string
The path to append to the URI
Details
visibility
private
final
true
static
false
throws

getUri

getUri( ) : Zend_Uri_Http

Retrieve the current request URI object

Output
Zend_Uri_Http
Details
visibility
public
final
false
static
false

restDelete

restDelete( string $path ) : Zend_Http_Response

Performs an HTTP DELETE request to $path.

Arguments
$path
string
Details
visibility
public
final
true
static
false
throws

restGet

restGet( string $path, array $query = null ) : Zend_Http_Response

Performs an HTTP GET request to the $path.

Arguments
$path
string
$query
array
Array of GET parameters
Details
visibility
public
final
true
static
false
throws

restPost

restPost( string $path, mixed $data = null ) : Zend_Http_Response

Performs an HTTP POST request to $path.

Arguments
$path
string
$data
mixed
Raw data to send
Details
visibility
public
final
true
static
false
throws

restPut

restPut( string $path, mixed $data = null ) : Zend_Http_Response

Performs an HTTP PUT request to $path.

Arguments
$path
string
$data
mixed
Raw data to send in request
Details
visibility
public
final
true
static
false
throws

setUri

setUri( string|Zend_Uri_Http $uri ) : Zend_Rest_Client

Set the URI to use in the request

Arguments
$uri
stringZend_Uri_Http
URI for the web service
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.