This commit is contained in:
2022-10-10 16:46:44 -03:00
parent 422d9a6dbd
commit 0a9bed1735
2 changed files with 2 additions and 2 deletions

View File

@ -78,7 +78,7 @@ abstract class Model implements ModelInterface
if ($method->getName() === 'getRepository') {
continue;
}
$p = strtolower(str_replace('get', '', $method->getName()));
$p = strtolower(preg_replace('/(?<!^)[A-Z]/', '_$0', str_replace('get', '', $method->getName())));
if (!isset($this->{$p})) {
continue;
}