return static::$databaseTableIndexName;
}
- static $databaseTableIndexName = null;
- if ($databaseTableIndexName === null) {
- $className = \explode('\\', static::class);
- $className = \get_called_class();
++ $className = static::class;
+ static $databaseTableIndexNames = [];
+ if (!isset($databaseTableIndexNames[$className])) {
+ $classParts = \explode('\\', $className);
$parts = \preg_split(
'~(?=[A-Z](?=[a-z]))~',
- \array_pop($className),
+ \array_pop($classParts),
-1,
\PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY
);