From c832b539d09cf4c0b92ebabf76c06d9d60d80f1a Mon Sep 17 00:00:00 2001 From: Arnaud Lafon Date: Tue, 24 Jan 2017 14:14:23 +0100 Subject: [PATCH] Make it possible to call key functions when extending Dataloader --- src/DataLoader.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/DataLoader.php b/src/DataLoader.php index 918879e..28642cd 100644 --- a/src/DataLoader.php +++ b/src/DataLoader.php @@ -270,7 +270,12 @@ private static function awaitInstances() } } - private function getCacheKeyFromKey($key) + /** + * @param $key + * + * @return mixed + */ + protected function getCacheKeyFromKey($key) { $cacheKeyFn = $this->options->getCacheKeyFn(); $cacheKey = $cacheKeyFn ? $cacheKeyFn($key) : $key; @@ -278,7 +283,11 @@ private function getCacheKeyFromKey($key) return $cacheKey; } - private function checkKey($key, $method) + /** + * @param $key + * @param $method + */ + protected function checkKey($key, $method) { if (null === $key) { throw new \InvalidArgumentException(