This commit is contained in:
as2252258@163.com
2021-05-03 03:48:52 +08:00
parent a90e647529
commit 8137b24865
25 changed files with 273 additions and 306 deletions
+4 -4
View File
@@ -31,14 +31,14 @@ use Snowflake\Snowflake;
* @return mixed
* @throws Exception
*/
public function execute(array $handler): mixed
public function execute(mixed $class, mixed $method = null): mixed
{
$router = Snowflake::app()->getRouter();
if (!($handler[0] instanceof Porters)) {
if (!($class instanceof Porters)) {
return true;
}
$router->addPortListen($this->port, [$handler[0], 'process']);
return parent::execute($handler);
$router->addPortListen($this->port, [$class, 'process']);
return true;
}
}