Skip to content

Commit

Permalink
Breaking: attempt to call getter with getFoo(). foo() is still availa…
Browse files Browse the repository at this point in the history
…ble as fallback (for now).
  • Loading branch information
mducharme committed Jul 18, 2019
1 parent 30e9be2 commit 3f3ab13
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Charcoal/Config/AbstractEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,10 @@ public function offsetGet($key)
return null;
}

if (is_callable([ $this, $key ])) {
$getter = 'get'.ucfirst($key);
if (is_callable([ $this, $getter])) {
return $this->{$getter}();
} elseif (is_callable([ $this, $key ])) {
return $this->{$key}();
} else {
if (isset($this->{$key})) {
Expand Down

0 comments on commit 3f3ab13

Please sign in to comment.