diff --git a/Annotation/Port.php b/Annotation/Port.php index 6cd1ecc3..beeb0bcb 100644 --- a/Annotation/Port.php +++ b/Annotation/Port.php @@ -4,6 +4,14 @@ namespace Annotation; +use Exception; +use Snowflake\Snowflake; + + +/** + * Class Port + * @package Annotation + */ #[\Attribute(\Attribute::TARGET_METHOD)] class Port extends Attribute { @@ -20,10 +28,13 @@ namespace Annotation; /** * @param array $handler * @return mixed + * @throws Exception */ public function execute(array $handler): mixed { - return parent::execute($handler); // TODO: Change the autogenerated stub + $router = Snowflake::app()->getRouter(); + $router->addPortListen($this->port, $handler); + return parent::execute($handler); } }