改名
This commit is contained in:
@@ -168,14 +168,12 @@ class ActiveRecord extends BaseActiveRecord
|
|||||||
* @return static
|
* @return static
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
#[Pure] private static function getModelClass(): static
|
private static function getModelClass(): static
|
||||||
{
|
{
|
||||||
return new static();
|
|
||||||
$className = get_called_class();
|
|
||||||
/** @var Channel $channel */
|
/** @var Channel $channel */
|
||||||
$channel = Snowflake::app()->get('channel');
|
$channel = Snowflake::app()->get('channel');
|
||||||
return $channel->pop($className, function () use ($className) {
|
return $channel->pop(static::class, function () {
|
||||||
return new $className();
|
return new static();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -362,6 +362,7 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getAttributes(): array
|
public function getAttributes(): array
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user