Skip to content
Permalink
Browse files

Expanding some doc blocks for DataSource.

  • Loading branch information...
markstory committed Oct 20, 2009
1 parent 3922f13 commit 0a79822b9de901de6f5098990beb4086d98901c3
Showing with 21 additions and 13 deletions.
  1. +21 −13 cake/libs/model/datasources/datasource.php
@@ -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) {

0 comments on commit 0a79822

Please sign in to comment.
You can’t perform that action at this time.