HttpSourceDocument

Extends \HttpSourceModel

Test Document model

package

HttpSourceTest

subpackage

Model

Methods

Removes record for given ID. If no ID is given, the current ID is used. Returns true on success.

delete(integer|string $id = null, boolean $cascade = true) : boolean
inherited
link

http://book.cakephp.org/2.0/en/models/deleting-data.html

Arguments

$id

integer|string

ID of record to delete

$cascade

boolean

Set to true to delete records that depend on this record (NOT USED)

Response

boolean

True on success

Deletes multiple model records based on a set of conditions.

deleteAll(mixed $conditions, boolean $cascade = true, boolean $callbacks = false) : boolean
inherited
link

http://book.cakephp.org/2.0/en/models/deleting-data.html#deleteall

Arguments

$conditions

mixed

Conditions to match

$cascade

boolean

Set to true to delete records that depend on this record (NOT USED)

$callbacks

boolean

Run callbacks (NOT USED)

Response

boolean

True on success, false on failure

Returns true if a record with particular ID exists.

exists(integer|string $id = null, array $conditions = array(), boolean $force = false) : boolean
inherited

If $id is not passed it calls Model::getID() to obtain the current record ID, and then performs a Model::find('count') on the currently configured datasource to ascertain the existence of the record in persistent storage.

Arguments

$id

integer|string

ID of record to check for existence

$conditions

array

Addiditional conditions

$force

boolean

If true will call exists method if datasource, return true otherwise

Response

boolean

True if such a record exists

Explain query

explain(string $ds, string $query) : string
inherited

Arguments

$ds

string

$query

string

Response

string

Return transaction params

getTransactionParams() : array
inherited

Response

array

Returns true if the supplied field exists in the model's database table.

hasField(string|array $name, boolean $checkVirtual = false) : mixed
inherited

Arguments

$name

string|array

Name of field to look for, or an array of names

$checkVirtual

boolean

checks if the field is declared as virtual

Response

mixed

If $name is a string, returns a boolean indicating whether the field exists. If $name is an array of field names, returns the first field that exists, or false if none exist.

Sets credentials data

setCredentials(array $credentials = array()) 
inherited

Arguments

$credentials

array

Set parameters for endpoint wich handle transactions

setTransactionParams(string $table, array $params = array(), string $transactionsField = 'transactions', string $method = \HttpSource::METHOD_CREATE) 
inherited

Arguments

$table

string

$params

array

$transactionsField

string

$method

string

Wrapper for save() to use update method datasource

update(array $data = null, boolean|array $validate = true, array $fieldList = array()) : mixed
inherited
link

http://book.cakephp.org/2.0/en/models/saving-your-data.html

Arguments

$data

array

Data to save.

$validate

boolean|array

Either a boolean, or an array. If a boolean, indicates whether or not to validate before saving. If an array, allows control of validate, callbacks, and fieldList

$fieldList

array

List of fields to allow to be written

Response

mixed

On success Model::$data if its not empty or true, false on failure

Properties

Model name

name : string
inherited
var

Type(s)

string

{@inheritdoc}

useTable : string
var

Type(s)

string