Skip to content

Commit

Permalink
Adding $type comment and adding valid examples
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickconroy committed Sep 6, 2014
1 parent 58c1f52 commit e8daeed
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/ORM/Table.php
Expand Up @@ -1940,8 +1940,18 @@ public function __debugInfo() {
/**
* Helper method to infer the requested finder and its options.
*
* Returns the inferred options from the finder $type.
* Returns the inferred options from the finder $type.
*
* ### Examples:
*
* The following will call the finder 'translations' with the value of the finder as its options:
* $query->contain(['Comments' => ['finder' => 'translations']]);
* $query->contain(['Comments' => ['finder' => ['translations']]]);
* $query->contain(['Comments' => ['finder' => ['translations' => []]]]);
* $query->contain(['Comments' => ['finder' => ['translations' => ['locales' => ['en_US']]]]]);
* $query->contain(['Comments' => ['finder' => ['translations' => 'customOption']]]);
*
* @param array $type Finder type as an array.
* @return array
*/
protected function _inferFinderTypeAndOptions(array $type) {
Expand Down

0 comments on commit e8daeed

Please sign in to comment.