From 0a79822b9de901de6f5098990beb4086d98901c3 Mon Sep 17 00:00:00 2001 From: mark_story Date: Mon, 19 Oct 2009 21:09:47 -0400 Subject: [PATCH] Expanding some doc blocks for DataSource. --- cake/libs/model/datasources/datasource.php | 34 +++++++++++++--------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/cake/libs/model/datasources/datasource.php b/cake/libs/model/datasources/datasource.php index b1b2baefb65..c92f8aff63e 100644 --- a/cake/libs/model/datasources/datasource.php +++ b/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) {