Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Documenting new function

  • Loading branch information...
commit f0ba802cea75d1746fa96e9b465e60dca8c4efa6 1 parent 75ab777
@lorenzo lorenzo authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 Cake/ORM/Association/ExternalAssociationTrait.php
View
10 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 = [];
Please sign in to comment.
Something went wrong with that request. Please try again.