This commit is contained in:
2021-04-25 11:22:23 +08:00
parent 5e2c46a3aa
commit 77a6445eea
13 changed files with 16 additions and 16 deletions
+2 -2
View File
@@ -36,7 +36,7 @@ class Producer extends Component
*/
public function addProducer(string $name, array $handler, array $node)
{
$this->classAlias[get_class($handler[0])] = $name;
$this->classAlias[$handler[0]::class] = $name;
$this->consumers[$name] = $handler[0];
@@ -50,7 +50,7 @@ class Producer extends Component
*/
public function addConsumer(string $cmd, array $handler)
{
$class = get_class($handler[0]);
$class = $handler[0]::class;
if (!isset($this->classAlias[$class])) {
return;