Permalink
Browse files

Documenting new function

  • Loading branch information...
1 parent 75ab777 commit f0ba802cea75d1746fa96e9b465e60dca8c4efa6 @lorenzo lorenzo committed Jan 12, 2014
Showing with 10 additions and 0 deletions.
  1. +10 −0 Cake/ORM/Association/ExternalAssociationTrait.php
@@ -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 = [];

0 comments on commit f0ba802

Please sign in to comment.