改名
This commit is contained in:
@@ -4,6 +4,14 @@
|
||||
namespace Annotation;
|
||||
|
||||
|
||||
use Annotation\Route\After;
|
||||
use Annotation\Route\Interceptor;
|
||||
use Annotation\Route\Limits;
|
||||
use Annotation\Route\Middleware as RMiddleware;
|
||||
use HttpServer\Route\Node;
|
||||
use ReflectionException;
|
||||
use Snowflake\Exception\ComponentException;
|
||||
use Snowflake\Exception\NotFindClassException;
|
||||
use Snowflake\Snowflake;
|
||||
|
||||
/**
|
||||
@@ -23,4 +31,5 @@ abstract class Attribute implements IAnnotation
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -43,7 +43,8 @@ use Snowflake\Snowflake;
|
||||
// TODO: Implement setHandler() method.
|
||||
$router = Snowflake::app()->getRouter();
|
||||
|
||||
$router->addRoute($this->uri, $handler, $this->method);
|
||||
$node = $router->addRoute($this->uri, $handler, $this->method);
|
||||
$node::annotationInject($node, get_class($handler[0]), $handler[1]);
|
||||
|
||||
return $router;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,9 @@ use Snowflake\Snowflake;
|
||||
|
||||
$method = $this->event . '::' . (is_null($this->uri) ? 'event' : $this->uri);
|
||||
|
||||
$router->addRoute($method, $handler, 'sw::socket');
|
||||
$node = $router->addRoute($method, $handler, 'sw::socket');
|
||||
|
||||
$node::annotationInject($node, get_class($handler[0]), $handler[1]);
|
||||
|
||||
return $router;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user