Skip to content

Commit

Permalink
Updating documentation for Model methods to improve api parsing.
Browse files Browse the repository at this point in the history
Removing redundant include.
  • Loading branch information
markstory committed Oct 6, 2009
1 parent c47e899 commit 3bf94e6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
31 changes: 17 additions & 14 deletions cake/libs/model/model.php
Expand Up @@ -453,7 +453,7 @@ function call__($method, $params) {
*
* @param mixed $model A model or association name (string) or set of binding options (indexed by model name type)
* @param array $options If $model is a string, this is the list of association properties with which $model will
* be bound
* be bound
* @param boolean $permanent Set to true to make the binding permanent
* @return void
* @access public
Expand Down Expand Up @@ -1114,8 +1114,8 @@ function saveField($name, $value, $validate = false) {
*
* @param array $data Data to save.
* @param mixed $validate Either a boolean, or an array.
* If a boolean, indicates whether or not to validate before saving.
* If an array, allows control of validate, callbacks, and fieldList
* If a boolean, indicates whether or not to validate before saving.
* If an array, allows control of validate, callbacks, and fieldList
* @param array $fieldList List of fields to allow to be written
* @return mixed On success Model::$data if its not empty or true, false on failure
* @access public
Expand Down Expand Up @@ -1459,17 +1459,20 @@ function _prepareUpdateFields($data) {
* Saves multiple individual records for a single model; Also works with a single record, as well as
* all its associated records.
*
* #### Options
*
* - validate: Set to false to disable validation, true to validate each record before
* saving, 'first' to validate *all* records before any are saved, or 'only' to only
* validate the records, but not save them.
* - atomic: If true (default), will attempt to save all records in a single transaction.
* Should be set to false if database/table does not support transactions.
* If false, we return an array similar to the $data array passed, but values are set to true/false
* depending on whether each record saved successfully.
* - fieldList: Equivalent to the $fieldList parameter in Model::save()
*
* @param array $data Record data to save. This can be either a numerically-indexed array (for saving multiple
* records of the same type), or an array indexed by association name.
* @param array $options Options to use when saving record data, which are as follows:
* - validate: Set to false to disable validation, true to validate each record before
* saving, 'first' to validate *all* records before any are saved, or 'only' to only
* validate the records, but not save them.
* - atomic: If true (default), will attempt to save all records in a single transaction.
* Should be set to false if database/table does not support transactions.
* If false, we return an array similar to the $data array passed, but values are set to true/false
* depending on whether each record saved successfully.
* - fieldList: Equivalent to the $fieldList parameter in Model::save()
* records of the same type), or an array indexed by association name.
* @param array $options Options to use when saving record data, See $options above.
* @return mixed True on success, or false on failure
* @access public
* @link http://book.cakephp.org/view/84/Saving-Related-Model-Data-hasOne-hasMany-belongsTo
Expand Down Expand Up @@ -1664,7 +1667,7 @@ function __save($data, $options) {
* Updates multiple model records based on a set of conditions.
*
* @param array $fields Set of fields and values, indexed by fields.
* Fields are treated as SQL snippets, to insert literal values manually escape your data.
* Fields are treated as SQL snippets, to insert literal values manually escape your data.
* @param mixed $conditions Conditions to match, true for all records
* @return boolean True on success, false on failure
* @access public
Expand Down
1 change: 0 additions & 1 deletion cake/tests/cases/libs/model/model_read.test.php
Expand Up @@ -25,7 +25,6 @@
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/
require_once dirname(__FILE__) . DS . 'model.test.php';
require_once dirname(__FILE__) . DS . 'model_read.test.php';
/**
* ModelReadTest
*
Expand Down

0 comments on commit 3bf94e6

Please sign in to comment.