Navigation Menu

Skip to content

Commit

Permalink
Documenting new function
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Jan 12, 2014
1 parent 75ab777 commit f0ba802
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Cake/ORM/Association/ExternalAssociationTrait.php
Expand Up @@ -180,6 +180,16 @@ protected function _resultInjector($fetchQuery, $resultMap) {
};
}

/**
* Returns a callable to be used for each row in a query result set
* for injecting the eager loaded rows when the matching needs to
* be done with multiple foreign keys
*
* @param array $resultMap a keyed arrays containing the target table
* @param array $sourceKeys an array witha aliased keys to match
* @param string $nestKey the key under which results should be nested
* @return \Closure
*/
protected function _multiKeysInjector($resultMap, $sourceKeys, $nestKey) {
return function($row) use ($resultMap, $sourceKeys, $nestKey) {
$values = [];
Expand Down

0 comments on commit f0ba802

Please sign in to comment.