diff --git a/cake/libs/model/datasources/datasource.php b/cake/libs/model/datasources/datasource.php index b1b2baefb..c92f8aff6 100644 --- a/cake/libs/model/datasources/datasource.php +++ b/cake/libs/model/datasources/datasource.php @@ -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) {