mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Expanding some doc blocks for DataSource.
This commit is contained in:
parent
3922f136da
commit
0a79822b9d
1 changed files with 21 additions and 13 deletions
|
@ -287,42 +287,50 @@ class DataSource extends Object {
|
|||
return false;
|
||||
}
|
||||
/**
|
||||
* Used to create new records. The "C" CRUD.
|
||||
*
|
||||
* To-be-overridden in subclasses.
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @param unknown_type $fields
|
||||
* @param unknown_type $values
|
||||
* @return unknown
|
||||
* @param Model $model The Model to be created.
|
||||
* @param array $fields An Array of fields to be saved.
|
||||
* @param array $values An Array of values to save.
|
||||
* @return boolean success
|
||||
*/
|
||||
function create(&$model, $fields = null, $values = null) {
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Used to read records from the Datasource. The "R" in CRUD
|
||||
*
|
||||
* To-be-overridden in subclasses.
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @param unknown_type $queryData
|
||||
* @return unknown
|
||||
* @param Model $model The model being read.
|
||||
* @param array $queryData An array of query data used to find the data you want
|
||||
* @return mixed
|
||||
*/
|
||||
function read(&$model, $queryData = array()) {
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Update a record(s) in the datasource.
|
||||
*
|
||||
* To-be-overridden in subclasses.
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @param unknown_type $fields
|
||||
* @param unknown_type $values
|
||||
* @return unknown
|
||||
* @param Model $model Instance of the model class being updated
|
||||
* @param array $fields Array of fields to be updated
|
||||
* @param array $values Array of values to be update $fields to.
|
||||
* @return boolean Success
|
||||
*/
|
||||
function update(&$model, $fields = null, $values = null) {
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Delete a record(s) in the datasource.
|
||||
*
|
||||
* To-be-overridden in subclasses.
|
||||
*
|
||||
* @param unknown_type $model
|
||||
* @param unknown_type $id
|
||||
* @param Model $model The model class having record(s) deleted
|
||||
* @param mixed $id Primary key of the model
|
||||
*/
|
||||
function delete(&$model, $id = null) {
|
||||
if ($id == null) {
|
||||
|
|
Loading…
Reference in a new issue