PHP Class RestClient, php-restclient

Show file Open project: tcdent/php-restclient Class Usage Examples

Public Properties

Property Type Description
$decoded_response Populated as-needed.
$error Response info object.
$handle
$headers Response body.
$info Parsed reponse header object.
$options
$response Populated after execution:
$response_status_lines Response error string.

Public Methods

Method Description
__construct ( $options = [] ) Decoded response body.
current ( )
decode_response ( )
delete ( $url, $parameters = [], $headers = [] )
execute ( $url, $method = 'GET', $parameters = [], $headers = [] )
format_query ( $parameters, $primary = '=', $secondary = '&' )
get ( $url, $parameters = [], $headers = [] ) Request methods:
get_response_format ( )
head ( $url, $parameters = [], $headers = [] )
key ( )
next ( )
offsetExists ( $key ) ArrayAccess methods:
offsetGet ( $key )
offsetSet ( $key, $value )
offsetUnset ( $key )
parse_response ( $response )
patch ( $url, $parameters = [], $headers = [] )
post ( $url, $parameters = [], $headers = [] )
put ( $url, $parameters = [], $headers = [] )
register_decoder ( $format, $method )
rewind ( ) Iterable methods:
set_option ( $key, $value )
valid ( )

Method Details

__construct() public method

Decoded response body.
public __construct ( $options = [] )

current() public method

public current ( )

decode_response() public method

public decode_response ( )

delete() public method

public delete ( $url, $parameters = [], $headers = [] )

execute() public method

public execute ( $url, $method = 'GET', $parameters = [], $headers = [] )

format_query() public method

public format_query ( $parameters, $primary = '=', $secondary = '&' )

get() public method

Request methods:
public get ( $url, $parameters = [], $headers = [] )

get_response_format() public method

public get_response_format ( )

head() public method

public head ( $url, $parameters = [], $headers = [] )

key() public method

public key ( )

next() public method

public next ( )

offsetExists() public method

ArrayAccess methods:
public offsetExists ( $key )

offsetGet() public method

public offsetGet ( $key )

offsetSet() public method

public offsetSet ( $key, $value )

offsetUnset() public method

public offsetUnset ( $key )

parse_response() public method

public parse_response ( $response )

patch() public method

public patch ( $url, $parameters = [], $headers = [] )

post() public method

public post ( $url, $parameters = [], $headers = [] )

put() public method

public put ( $url, $parameters = [], $headers = [] )

register_decoder() public method

public register_decoder ( $format, $method )

rewind() public method

Iterable methods:
public rewind ( )

set_option() public method

public set_option ( $key, $value )

valid() public method

public valid ( )

Property Details

$decoded_response public property

Populated as-needed.
public $decoded_response

$error public property

Response info object.
public $error

$handle public property

public $handle

$headers public property

Response body.
public $headers

$info public property

Parsed reponse header object.
public $info

$options public property

public $options

$response public property

Populated after execution:
public $response

$response_status_lines public property

Response error string.
public $response_status_lines