Skip to content
Permalink
Browse files

Adding $type comment and adding valid examples

  • Loading branch information...
patrickconroy committed Sep 6, 2014
1 parent 58c1f52 commit e8daeedec75be5d8cecbc23a15d32a0ab9469c0e
Showing with 11 additions and 1 deletion.
  1. +11 −1 src/ORM/Table.php
@@ -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) {

0 comments on commit e8daeed

Please sign in to comment.
You can’t perform that action at this time.