diff --git a/framework/base/router.class.php b/framework/base/router.class.php index e735758a34..db2e5b9ac5 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -3505,45 +3505,26 @@ class baseRouter } } -if(version_compare(PHP_VERSION, '8.2.0', '>=')) -{ - #[\AllowDynamicProperties] // https://www.php.net/manual/zh/class.allowdynamicproperties.php - class config - { - public function set(string $key, $value) - { - helper::setMember('config', $key, $value); - } - } -} -else +#[AllowDynamicProperties] +class config { /** - * config类。 - * The config class. + * 设置成员变量,成员可以是'db.user'类似的格式。 + * Set the value of a member. the member can be the format like db.user. * - * @package framework + * + * set('db.user', 'wwccss'); + * ?> + * + * @param string $key the key of the member + * @param mixed $value the value + * @access public + * @return void */ - class config + public function set(string $key, $value) { - /** - * 设置成员变量,成员可以是'db.user'类似的格式。 - * Set the value of a member. the member can be the format like db.user. - * - * - * set('db.user', 'wwccss'); - * ?> - * - * @param string $key the key of the member - * @param mixed $value the value - * @access public - * @return void - */ - public function set(string $key, $value) - { - helper::setMember('config', $key, $value); - } + helper::setMember('config', $key, $value); } }