Skip to content

Commit

Permalink
Updating doc blocks to improve parsing in the API.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Oct 6, 2009
1 parent c47e899 commit 51e4714
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
4 changes: 3 additions & 1 deletion cake/libs/model/behaviors/containable.php
Expand Up @@ -77,8 +77,9 @@ function setup(&$Model, $settings = array()) {
* Runs before a find() operation. Used to allow 'contain' setting
* as part of the find call, like this:
*
* Model->find('all', array('contain' => array('Model1', 'Model2')));
* `Model->find('all', array('contain' => array('Model1', 'Model2')));`
*
* {{{
* Model->find('all', array('contain' => array(
* 'Model1' => array('Model11', 'Model12'),
* 'Model2',
Expand All @@ -87,6 +88,7 @@ function setup(&$Model, $settings = array()) {
* 'Model32',
* 'Model33' => array('Model331', 'Model332')
* )));
* }}}
*
* @param object $Model Model using the behavior
* @param array $query Query parameters as set by cake
Expand Down
19 changes: 12 additions & 7 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 @@ -1909,14 +1909,19 @@ function hasAny($conditions = null) {
* second parameter options for finding ( indexed array, including: 'conditions', 'limit',
* 'recursive', 'page', 'fields', 'offset', 'order')
*
* Eg: find('all', array(
* 'conditions' => array('name' => 'Thomas Anderson'),
* 'fields' => array('name', 'email'),
* 'order' => 'field3 DESC',
* 'recursive' => 2,
* 'group' => 'type'));
* Eg:
* {{{
* find('all', array(
* 'conditions' => array('name' => 'Thomas Anderson'),
* 'fields' => array('name', 'email'),
* 'order' => 'field3 DESC',
* 'recursive' => 2,
* 'group' => 'type'
* ));
* }}}
*
* Specifying 'fields' for new-notation 'list':
*
* - If no fields are specified, then 'id' is used for key and 'model->displayField' is used for value.
* - If a single field is specified, 'id' is used for key and specified field is used for value.
* - If three fields are specified, they are used (in order) for key, value and group.
Expand Down

0 comments on commit 51e4714

Please sign in to comment.