Skip to content

Commit

Permalink
Expanding some doc blocks for DataSource.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Oct 20, 2009
1 parent 3922f13 commit 0a79822
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions cake/libs/model/datasources/datasource.php
Expand Up @@ -287,42 +287,50 @@ function column($real) {
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) {
Expand Down

0 comments on commit 0a79822

Please sign in to comment.