This commit is contained in:
2020-09-03 11:39:20 +08:00
parent 274332207b
commit efbb049824
42 changed files with 101 additions and 101 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ class Handler extends Application
*/
public function __construct()
{
$this->router = Snowflake::get()->router;
$this->router = Snowflake::app()->router;
parent::__construct([]);
}
+2 -2
View File
@@ -150,7 +150,7 @@ class Node extends Application
}
/** @var Annotation $annotation */
$annotation = Snowflake::get()->annotation->get('http');
$annotation = Snowflake::app()->annotation->get('http');
if (!empty($annotations = $annotation->getAnnotation(Annotation::class))) {
$this->_interceptors = $annotation->read($reflect, $action, $annotations);
}
@@ -273,7 +273,7 @@ class Node extends Application
*/
public function limits(int $limit, int $duration = 60, bool $isBindConsumer = false)
{
$limits = Snowflake::get()->getLimits();
$limits = Snowflake::app()->getLimits();
$limits->addLimits($this->path, $limit, $duration, $isBindConsumer);
return $this;
}
+1 -1
View File
@@ -472,7 +472,7 @@ class Router extends Application implements RouterInterface
$prefix = APP_PATH . 'app/Http/';
/** @var Annotation $annotation */
$annotation = Snowflake::get()->annotation;
$annotation = Snowflake::app()->annotation;
$annotation->register('http', Annotation::class);
$annotation = $annotation->get('http');