Свойство | Тип | Описание | |
---|---|---|---|
$element_name | The remote collection, e.g., person or thing | ||
$element_name_plural | Pleural form of the element name, e.g., people or things | ||
$errno | The error number if an error occurred. | ||
$error | An error message if an error occurred. | ||
$extra_params | Add any extra params to the end of the url eg: API key | ||
$password | HTTP Basic Authentication password | ||
$pleural_corrections | Corrections to improper pleuralizations. | ||
$request_body | The request that was sent to the server. | ||
$request_format | The format requests should use to send data (url or xml). | ||
$request_headers | The request headers that was sent to the server. | ||
$request_method | The request method sent to the server. | ||
$request_uri | The complete URL that the request was sent to. | ||
$response_body | The response body sent from the server. | ||
$response_code | The response code returned from the server. | ||
$response_headers | The raw response headers sent from the server. | ||
$site | The REST site address, e.g., http://user:pass@domain:port/ | ||
$user | HTTP Basic Authentication user |
Метод | Описание | |
---|---|---|
__construct ( $data = [] ) | Constructor method. | |
__get ( $k ) | Getter for internal object data. | |
__set ( $k, $v ) | Setter for internal object data. | |
_build_xml ( $k, $v ) | Simple recursive function to build an XML response. | |
_fetch ( $url, $method, $params ) | Fetch the specified request via cURL. | |
_send_and_receive ( $url, $method, $data = [], $start_tag = false ) | Build the request, call _fetch() and parse the results. | |
_unicode_ord ( string &$c, integer &$i ) : integer | Returns the unicode value of the string | |
_xml_entities ( string $s, boolean $hex = true ) : string | Makes the specified string XML-safe | |
destroy ( ) | Deletes a record via: | |
find ( $id = false, $options = [] ) | Finds a record or records via: | |
get ( $method, $options = [] ) | Gets a specified custom method on the current object via: | |
pleuralize ( $word ) | For backwards-compatibility. | |
pluralize ( $word ) | Pluralize the element name. | |
post ( $method, $options = [], $start_tag = false ) | Posts to a specified custom method on the current object via: | |
put ( $method, $options = [], $options_as_xml = false, $start_tag = false ) | Puts to a specified custom method on the current object via: | |
save ( ) | Saves a new record or updates an existing one via: | |
set ( $k, $v = false ) | Quick setter for chaining methods. |
public _build_xml ( $k, $v ) |
public _fetch ( $url, $method, $params ) |
public _send_and_receive ( $url, $method, $data = [], $start_tag = false ) |
public find ( $id = false, $options = [] ) |
public get ( $method, $options = [] ) |
public post ( $method, $options = [], $start_tag = false ) |
public put ( $method, $options = [], $options_as_xml = false, $start_tag = false ) |
public $element_name_plural |
public $extra_params |
public $pleural_corrections |
public $request_format |
public $request_headers |
public $response_headers |