Skip to content

Commit c832b53

Browse files
committed
Make it possible to call key functions when extending Dataloader
1 parent 55836c8 commit c832b53

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/DataLoader.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,15 +270,24 @@ private static function awaitInstances()
270270
}
271271
}
272272

273-
private function getCacheKeyFromKey($key)
273+
/**
274+
* @param $key
275+
*
276+
* @return mixed
277+
*/
278+
protected function getCacheKeyFromKey($key)
274279
{
275280
$cacheKeyFn = $this->options->getCacheKeyFn();
276281
$cacheKey = $cacheKeyFn ? $cacheKeyFn($key) : $key;
277282

278283
return $cacheKey;
279284
}
280285

281-
private function checkKey($key, $method)
286+
/**
287+
* @param $key
288+
* @param $method
289+
*/
290+
protected function checkKey($key, $method)
282291
{
283292
if (null === $key) {
284293
throw new \InvalidArgumentException(

0 commit comments

Comments
 (0)