Last active
March 20, 2017 08:00
-
-
Save c9s/595b27658d2dc2966198c226bb7457e8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* An alias for BaseRepo::loadByKeys | |
*/ | |
protected static function loadByKeys(array $args, $byKeys = null) | |
{ | |
if (static::SHARD_MAPPING_ID) { | |
return static::shards()->first(function(BaseRepo $repo, Shard $shard) use ($arg, $byKeys) { | |
return $repo->loadByKeys($args, $byKeys); | |
}); | |
} | |
return static::masterRepo()->loadByKeys($args, $byKeys); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment