This commit is contained in:
2021-04-27 18:57:25 +08:00
parent 55acb2795f
commit b294d0fbde
2 changed files with 4 additions and 5 deletions
+3 -5
View File
@@ -168,14 +168,12 @@ class ActiveRecord extends BaseActiveRecord
* @return static
* @throws Exception
*/
#[Pure] private static function getModelClass(): static
private static function getModelClass(): static
{
return new static();
$className = get_called_class();
/** @var Channel $channel */
$channel = Snowflake::app()->get('channel');
return $channel->pop($className, function () use ($className) {
return new $className();
return $channel->pop(static::class, function () {
return new static();
});
}