改名
This commit is contained in:
@@ -10,11 +10,6 @@ declare(strict_types=1);
|
||||
namespace Kiri\Abstracts;
|
||||
|
||||
|
||||
use Exception;
|
||||
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
use Kiri\Exception\ComponentException;
|
||||
use Kiri\Kiri;
|
||||
|
||||
/**
|
||||
* Class Component
|
||||
@@ -24,32 +19,5 @@ class Component extends BaseObject
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @param $name
|
||||
* @param $value
|
||||
* @throws Exception
|
||||
*/
|
||||
public function __set($name, $value)
|
||||
{
|
||||
if (property_exists($this, $name)) {
|
||||
$this->$name = $value;
|
||||
} else {
|
||||
parent::__set($name, $value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $name
|
||||
* @return mixed
|
||||
* @throws Exception
|
||||
*/
|
||||
public function __get($name): mixed
|
||||
{
|
||||
if (property_exists($this, $name)) {
|
||||
return $this->$name ?? null;
|
||||
} else {
|
||||
return parent::__get($name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user