Revert "改名"

This reverts commit fdf58326
This commit is contained in:
2022-01-20 19:05:57 +08:00
parent b557f15a98
commit adb2269df0
+2 -35
View File
@@ -23,9 +23,6 @@ use Psr\Container\NotFoundExceptionInterface;
/**
* Class Component
* @package Kiri\Base
* @property ContainerInterface|Container $container
* @property EventProvider $eventProvider
* @property EventDispatch $eventDispatch
*/
class Component implements Configure
{
@@ -67,6 +64,8 @@ class Component implements Configure
/**
* @return EventDispatch
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
protected function getEventDispatch(): EventDispatch
{
@@ -89,38 +88,6 @@ class Component implements Configure
return static::class;
}
/**
* @param $name
* @param $value
*
* @throws Exception
*/
public function __set($name, $value)
{
$method = 'set' . ucfirst($name);
if (method_exists($this, $method)) {
$this->{$method}($value);
} else {
throw new Exception('The set name ' . $name . ' not find in class ' . static::class);
}
}
/**
* @param $name
*
* @return mixed
* @throws Exception
*/
public function __get($name): mixed
{
$method = 'get' . ucfirst($name);
if (method_exists($this, $method)) {
return $this->$method();
} else {
throw new Exception('The get name ' . $name . ' not find in class ' . static::class);
}
}
/**
* @param $message