Skip to content

Commit

Permalink
docblock tweaks for apigen
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Apr 7, 2013
1 parent 20047c5 commit 819d9e2
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions lib/Cake/Model/Model.php
Expand Up @@ -643,11 +643,11 @@ class Model extends Object implements CakeEventListener {
*
* If `$id` is an array it can be used to pass several options into the model.
*
* - id - The id to start the model on.
* - table - The table to use for this model.
* - ds - The connection name this model is connected to.
* - name - The name of the model eg. Post.
* - alias - The alias of the model, this is used for registering the instance in the `ClassRegistry`.
* - `id`: The id to start the model on.
* - `table`: The table to use for this model.
* - `ds`: The connection name this model is connected to.
* - `name`: The name of the model eg. Post.
* - `alias`: The alias of the model, this is used for registering the instance in the `ClassRegistry`.
* eg. `ParentThread`
*
* ### Overriding Model's __construct method.
Expand Down Expand Up @@ -1202,7 +1202,7 @@ protected function _setAliasData($data) {
}

/**
* Normalize Xml::toArray() to use in Model::save()
* Normalize `Xml::toArray()` to use in `Model::save()`
*
* @param array $xml XML as array
* @return array
Expand Down Expand Up @@ -1601,9 +1601,9 @@ public function saveField($name, $value, $validate = false) {
* If a boolean, indicates whether or not to validate before saving.
* If an array, can have following keys:
*
* - `validate`: Set to true/false to enable or disable validation.
* - `fieldList`: An array of fields you want to allow for saving.
* - `callbacks`: Set to false to disable callbacks. Using 'before' or 'after'
* - validate: Set to true/false to enable or disable validation.
* - fieldList: An array of fields you want to allow for saving.
* - callbacks: Set to false to disable callbacks. Using 'before' or 'after'
* will enable only those callbacks.
*
* @param array $fieldList List of fields to allow to be saved
Expand Down Expand Up @@ -1979,7 +1979,7 @@ public function updateCounterCache($keys = array(), $created = false) {
}

/**
* Helper method for Model::updateCounterCache(). Checks the fields to be updated for
* Helper method for `Model::updateCounterCache()`. Checks the fields to be updated for
*
* @param array $data The fields of the record that will be updated
* @return array Returns updated foreign key values, along with an 'old' key containing the old
Expand Down Expand Up @@ -2014,20 +2014,20 @@ protected function _prepareUpdateFields($data) {
*
* #### Options
*
* - validate: Set to false to disable validation, true to validate each record before saving,
* - `validate`: Set to false to disable validation, true to validate each record before saving,
* 'first' to validate *all* records before any are saved (default),
* 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.
* - `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.
* - fieldList: Equivalent to the $fieldList parameter in Model::save().
* - `fieldList`: Equivalent to the $fieldList parameter in Model::save().
* It should be an associate array with model name as key and array of fields as value. Eg.
* {{{
* array(
* 'SomeModel' => array('field'),
* 'AssociatedModel' => array('field', 'otherfield')
* )
* }}}
* - deep: see saveMany/saveAssociated
* - `deep`: see saveMany/saveAssociated
*
* @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.
Expand Down Expand Up @@ -2057,12 +2057,12 @@ public function saveAll($data = array(), $options = array()) {
*
* #### Options
*
* - validate: Set to false to disable validation, true to validate each record before saving,
* - `validate`: Set to false to disable validation, true to validate each record before saving,
* 'first' to validate *all* records before any are saved (default),
* - atomic: If true (default), will attempt to save all records in a single transaction.
* - `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.
* - fieldList: Equivalent to the $fieldList parameter in Model::save()
* - deep: If set to true, all associated data will be saved as well.
* - `fieldList`: Equivalent to the $fieldList parameter in Model::save()
* - `deep`: If set to true, all associated data will be saved as well.
*
* @param array $data Record data to save. This should be a numerically-indexed array
* @param array $options Options to use when saving record data, See $options above.
Expand Down Expand Up @@ -2140,9 +2140,9 @@ public function saveMany($data = null, $options = array()) {
*
* #### Options
*
* - atomic: If true (default), returns boolean. If false returns array.
* - fieldList: Equivalent to the $fieldList parameter in Model::save()
* - deep: If set to true, all associated data will be validated as well.
* - `atomic`: If true (default), returns boolean. If false returns array.
* - `fieldList`: Equivalent to the $fieldList parameter in Model::save()
* - `deep`: If set to true, all associated data will be validated as well.
*
* Warning: This method could potentially change the passed argument `$data`,
* If you do not want this to happen, make a copy of `$data` before passing it
Expand All @@ -2163,19 +2163,19 @@ public function validateMany(&$data, $options = array()) {
*
* #### Options
*
* - `validate` Set to `false` to disable validation, `true` to validate each record before saving,
* - `validate`: Set to `false` to disable validation, `true` to validate each record before saving,
* 'first' to validate *all* records before any are saved(default),
* - `atomic` If true (default), will attempt to save all records in a single transaction.
* - `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.
* - fieldList: Equivalent to the $fieldList parameter in Model::save().
* - `fieldList`: Equivalent to the $fieldList parameter in Model::save().
* It should be an associate array with model name as key and array of fields as value. Eg.
* {{{
* array(
* 'SomeModel' => array('field'),
* 'AssociatedModel' => array('field', 'otherfield')
* )
* }}}
* - deep: If set to true, not only directly associated data is saved, but deeper nested associated data as well.
* - `deep`: If set to true, not only directly associated data is saved, but deeper nested associated data as well.
*
* @param array $data Record data to save. This should be an array indexed by association name.
* @param array $options Options to use when saving record data, See $options above.
Expand Down Expand Up @@ -2347,9 +2347,9 @@ protected function _addToWhiteList($key, $options) {
*
* #### Options
*
* - atomic: If true (default), returns boolean. If false returns array.
* - fieldList: Equivalent to the $fieldList parameter in Model::save()
* - deep: If set to true, not only directly associated data , but deeper nested associated data is validated as well.
* - `atomic`: If true (default), returns boolean. If false returns array.
* - `fieldList`: Equivalent to the $fieldList parameter in Model::save()
* - `deep`: If set to true, not only directly associated data , but deeper nested associated data is validated as well.
*
* Warning: This method could potentially change the passed argument `$data`,
* If you do not want this to happen, make a copy of `$data` before passing it
Expand Down Expand Up @@ -2581,8 +2581,8 @@ protected function _collectForeignKeys($type = 'belongsTo') {
/**
* Returns true if a record with particular ID exists.
*
* If $id is not passed it calls Model::getID() to obtain the current record ID,
* and then performs a Model::find('count') on the currently configured datasource
* If $id is not passed it calls `Model::getID()` to obtain the current record ID,
* and then performs a `Model::find('count')` on the currently configured datasource
* to ascertain the existence of the record in persistent storage.
*
* @param integer|string $id ID of record to check for existence
Expand Down

0 comments on commit 819d9e2

Please sign in to comment.