Skip to content

Commit

Permalink
Updating doc blocks to improve API parsing.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Oct 6, 2009
1 parent a99d2ea commit 2d2e692
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
8 changes: 5 additions & 3 deletions cake/libs/model/model.php
Expand Up @@ -757,10 +757,12 @@ function setSource($tableName) {
$this->schema();
}
/**
* This function does two things: 1) it scans the array $one for the primary key,
* This function does two things:
*
* 1. it scans the array $one for the primary key,
* and if that's found, it sets the current id to the value of $one[id].
* For all other keys than 'id' the keys and values of $one are copied to the 'data' property of this object.
* 2) Returns an array with all of $one's keys and values.
* 2. Returns an array with all of $one's keys and values.
* (Alternative indata: two strings, which are mangled to
* a one-item, two-dimensional array using $one for a key and $two as its value.)
*
Expand Down Expand Up @@ -1377,7 +1379,7 @@ function __saveMulti($joined, $id) {
*
* @param array $keys Optional foreign key data, defaults to the information $this->data
* @param boolean $created True if a new record was created, otherwise only associations with
* 'counterScope' defined get updated
* 'counterScope' defined get updated
* @return void
* @access public
*/
Expand Down
14 changes: 9 additions & 5 deletions cake/libs/set.php
Expand Up @@ -340,9 +340,11 @@ function format($data, $format, $keys) {
return $out;
}
/**
* Implements partial support for XPath 2.0. If $path is an array or $data is empty it the call is delegated to Set::classicExtract.
* Implements partial support for XPath 2.0. If $path is an array or $data is empty it the call
* is delegated to Set::classicExtract.
*
* #### Currently implemented selectors:
*
* Currently implemented selectors:
* - /User/id (similar to the classic {n}.User.id)
* - /User[2]/name (selects the name of the second User)
* - /User[id>2] (selects all Users with an id > 2)
Expand All @@ -355,11 +357,13 @@ function format($data, $format, $keys) {
* - /Comment[text=/cakephp/i] (Selects the all comments that have a text matching the regex /cakephp/i)
* - /Comment/@* (Selects the all key names of all comments)
*
* Other limitations:
* #### Other limitations:
*
* - Only absolute paths starting with a single '/' are supported right now
*
* Warning: Even so it has plenty of unit tests the XPath support has not gone through a lot of real-world testing. Please report
* Bugs as you find them. Suggestions for additional features to imlement are also very welcome!
* **Warning**: Even so it has plenty of unit tests the XPath support has not gone through a lot of
* real-world testing. Please report Bugs as you find them. Suggestions for additional features to
* implement are also very welcome!
*
* @param string $path An absolute XPath 2.0 path
* @param string $data An array of data to extract from
Expand Down

0 comments on commit 2d2e692

Please sign in to comment.