We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0efc1f9 commit 596507cCopy full SHA for 596507c
src/Model/Behavior/FetchableBehavior.php
@@ -31,16 +31,16 @@ class FetchableBehavior extends Behavior
31
*/
32
public function initialize(array $config)
33
{
34
+ // key is set automatically
35
+ if (!isset($config['key'])) {
36
+ $config['key'] = 'Fetchable.' . $this->_table->getAlias();
37
+ }
38
+
39
// key can be callable
40
if (\is_callable($config['key'])) {
41
$config['key'] = $config['key']($this->_table->getAlias());
42
}
43
- // key is set automatically
- if (!$config['key']) {
- $config['key'] = 'Fetchable.' . $this->_table->getAlias();
- }
-
44
$this->setConfig('key', $config['key']);
45
46
0 commit comments