mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-09 13:38:41 +00:00
optimize model selection
This commit is contained in:
parent
4ebc825b16
commit
199b13ad75
|
|
@ -3173,8 +3173,7 @@ class DataMapperAbstract implements DataMapperInterface
|
||||||
*/
|
*/
|
||||||
private static function createNullModel($id = null)
|
private static function createNullModel($id = null)
|
||||||
{
|
{
|
||||||
$class = static::class;
|
$class = empty(static::$model) ? \substr(static::class, 0, -6) : static::$model;
|
||||||
$class = empty(static::$model) ? \substr($class, 0, -6) : static::$model;
|
|
||||||
$parts = \explode('\\', $class);
|
$parts = \explode('\\', $class);
|
||||||
$name = $parts[$c = (\count($parts) - 1)];
|
$name = $parts[$c = (\count($parts) - 1)];
|
||||||
$parts[$c] = 'Null' . $name;
|
$parts[$c] = 'Null' . $name;
|
||||||
|
|
@ -3199,8 +3198,7 @@ class DataMapperAbstract implements DataMapperInterface
|
||||||
*/
|
*/
|
||||||
private static function createBaseModel()
|
private static function createBaseModel()
|
||||||
{
|
{
|
||||||
$class = static::class;
|
$class = empty(static::$model) ? \substr(static::class, 0, -6) : static::$model;
|
||||||
$class = empty(static::$model) ? \substr($class, 0, -6) : static::$model;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @todo Orange-Management/phpOMS#67
|
* @todo Orange-Management/phpOMS#67
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user