eee
This commit is contained in:
@@ -10,6 +10,7 @@ declare(strict_types=1);
|
||||
namespace Database;
|
||||
|
||||
|
||||
use Database\Base\ActiveQueryInterface;
|
||||
use Exception;
|
||||
|
||||
defined('SAVE_FAIL') or define('SAVE_FAIL', 3227);
|
||||
@@ -21,6 +22,8 @@ defined('FIND_OR_CREATE_MESSAGE') or define('FIND_OR_CREATE_MESSAGE', 'Create a
|
||||
*
|
||||
* @property $attributes
|
||||
* @property-read $oldAttributes
|
||||
*
|
||||
* @mixin ActiveQueryInterface
|
||||
*/
|
||||
class Model extends Base\Model
|
||||
{
|
||||
@@ -130,6 +133,22 @@ class Model extends Base\Model
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param array $arguments
|
||||
* @return mixed
|
||||
*/
|
||||
public static function __callStatic(string $name, array $arguments)
|
||||
{
|
||||
// TODO: Change the autogenerated stub
|
||||
if (method_exists(static::class, $name)) {
|
||||
return call_user_func(static::class . '::' . $name, ...$arguments);
|
||||
} else {
|
||||
return static::query()->{$name}(...$arguments);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $columns
|
||||
* @param $action
|
||||
|
||||
Reference in New Issue
Block a user