改名
This commit is contained in:
@@ -104,11 +104,9 @@ class Middleware
|
|||||||
*/
|
*/
|
||||||
protected function annotation(Node $node): array
|
protected function annotation(Node $node): array
|
||||||
{
|
{
|
||||||
$middleWares = $this->annotation_limit($node);
|
$middleWares = $node->getMiddleWares();
|
||||||
|
$middleWares = $this->annotation_limit($node, $middleWares);
|
||||||
$middleWares = $this->annotation_interceptor($node, $middleWares);
|
$middleWares = $this->annotation_interceptor($node, $middleWares);
|
||||||
foreach ($node->getMiddleWares() as $middleWare) {
|
|
||||||
$middleWares[] = $middleWare;
|
|
||||||
}
|
|
||||||
return $middleWares;
|
return $middleWares;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ use HttpServer\Http\Request;
|
|||||||
use Exception;
|
use Exception;
|
||||||
use HttpServer\Application;
|
use HttpServer\Application;
|
||||||
|
|
||||||
|
use JetBrains\PhpStorm\Pure;
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
use Snowflake\Core\Json;
|
use Snowflake\Core\Json;
|
||||||
use Snowflake\Exception\NotFindClassException;
|
use Snowflake\Exception\NotFindClassException;
|
||||||
@@ -81,7 +82,7 @@ class Node extends Application
|
|||||||
/**
|
/**
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function hasInterceptor(): bool
|
#[Pure] public function hasInterceptor(): bool
|
||||||
{
|
{
|
||||||
return count($this->_interceptors) > 0;
|
return count($this->_interceptors) > 0;
|
||||||
}
|
}
|
||||||
@@ -90,7 +91,7 @@ class Node extends Application
|
|||||||
/**
|
/**
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function hasLimits(): bool
|
#[Pure] public function hasLimits(): bool
|
||||||
{
|
{
|
||||||
return count($this->_limits) > 0;
|
return count($this->_limits) > 0;
|
||||||
}
|
}
|
||||||
@@ -129,7 +130,7 @@ class Node extends Application
|
|||||||
/**
|
/**
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function hasAfter(): bool
|
#[Pure] public function hasAfter(): bool
|
||||||
{
|
{
|
||||||
return count($this->_after) > 0;
|
return count($this->_after) > 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user