Test Document model
| package |
HttpSourceTest |
|---|---|
| subpackage |
Model |
delete(integer|string $id = null, boolean $cascade = true) : boolean
| link |
|---|
integer|stringID of record to delete
booleanSet to true to delete records that depend on this record (NOT USED)
booleanTrue on success
deleteAll(mixed $conditions, boolean $cascade = true, boolean $callbacks = false) : boolean
| link |
http://book.cakephp.org/2.0/en/models/deleting-data.html#deleteall |
|---|
mixedConditions to match
booleanSet to true to delete records that depend on this record (NOT USED)
booleanRun callbacks (NOT USED)
booleanTrue on success, false on failure
exists(integer|string $id = null, array $conditions = array(), boolean $force = false) : boolean
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.
integer|stringID of record to check for existence
arrayAddiditional conditions
booleanIf true will call exists method if datasource, return true otherwise
booleanTrue if such a record exists
explain(string $ds, string $query) : string
string
string
string
getTransactionParams() : array
array
hasField(string|array $name, boolean $checkVirtual = false) : mixed
string|arrayName of field to look for, or an array of names
booleanchecks if the field is declared as virtual
mixedIf $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.
setCredentials(array $credentials = array())
array
setTransactionParams(string $table, array $params = array(), string $transactionsField = 'transactions', string $method = \HttpSource::METHOD_CREATE)
string
array
string
string
update(array $data = null, boolean|array $validate = true, array $fieldList = array()) : mixed
| link |
|---|
arrayData to save.
boolean|arrayEither 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
arrayList of fields to allow to be written
mixedOn success Model::$data if its not empty or true, false on failure
name : string
| var |
|---|
string
useTable : string
| var |
|---|
string