From 51e471427a8480f6858dd5fce3c5500254627004 Mon Sep 17 00:00:00 2001 From: mark_story Date: Mon, 5 Oct 2009 21:01:31 -0400 Subject: [PATCH] Updating doc blocks to improve parsing in the API. --- cake/libs/model/behaviors/containable.php | 4 +++- cake/libs/model/model.php | 19 ++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/cake/libs/model/behaviors/containable.php b/cake/libs/model/behaviors/containable.php index a602efff37e..ed5dd6d5d73 100644 --- a/cake/libs/model/behaviors/containable.php +++ b/cake/libs/model/behaviors/containable.php @@ -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', @@ -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 diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php index d437edf8ea3..3f0cc4d7e2a 100644 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -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 @@ -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.