改名
This commit is contained in:
@@ -35,7 +35,7 @@ use Kiri\Events\EventProvider;
|
||||
public function execute(mixed $class, mixed $method = null): bool
|
||||
{
|
||||
$pro = di(EventProvider::class);
|
||||
$pro->on($this->name, [$class, $method]);
|
||||
$pro->on($this->name, [di($class), $method]);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ use Kiri\Kiri;
|
||||
* @param $class
|
||||
* @param $method
|
||||
* @return ReflectionProperty|bool
|
||||
* @throws ReflectionException
|
||||
*/
|
||||
private function getProperty($class, $method): ReflectionProperty|bool
|
||||
{
|
||||
|
||||
@@ -45,11 +45,10 @@ use Server\Events\OnWorkerExit;
|
||||
*/
|
||||
public function execute(mixed $class, mixed $method = null): bool
|
||||
{
|
||||
$class = ['class' => $class::class];
|
||||
$class = ['class' => $class];
|
||||
if (!empty($this->args)) {
|
||||
$class = array_merge($class, $this->args);
|
||||
}
|
||||
|
||||
Kiri::set($this->service, $class);
|
||||
return true; // TODO: Change the autogenerated stub
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ use Kiri\Kiri;
|
||||
public function execute(mixed $class, mixed $method = null): bool
|
||||
{
|
||||
$annotation = Kiri::getAnnotation();
|
||||
$annotation->addGets($class::class, $this->name, $method);
|
||||
$annotation->addGets($class, $this->name, $method);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ use Kiri\Kiri;
|
||||
public function execute(mixed $class, mixed $method = null): bool
|
||||
{
|
||||
$annotation = Kiri::getAnnotation();
|
||||
$annotation->addRelate($class::class, $this->name, $method);
|
||||
$annotation->addRelate($class, $this->name, $method);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ use Kiri\Kiri;
|
||||
public function execute(mixed $class, mixed $method = null): bool
|
||||
{
|
||||
$annotation = Kiri::getAnnotation();
|
||||
$annotation->addSets($class::class, $this->name, $method);
|
||||
$annotation->addSets($class, $this->name, $method);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ use Kiri\Kiri;
|
||||
{
|
||||
// TODO: Implement setHandler() method.
|
||||
$router = Kiri::app()->getRouter();
|
||||
$router->addRoute($this->uri, [$class, $method], $this->method);
|
||||
$router->addRoute($this->uri, [di($class::class), $method], $this->method);
|
||||
return $router;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ use Kiri\Kiri;
|
||||
|
||||
$path = $this->event . '::' . (is_null($this->uri) ? 'event' : $this->uri);
|
||||
|
||||
$router->addRoute($path, [$class, $method], 'sw::socket');
|
||||
$router->addRoute($path, [di($class), $method], 'sw::socket');
|
||||
|
||||
return $router;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user