改名
This commit is contained in:
@@ -116,14 +116,16 @@ class Annotation extends \Snowflake\Annotation\Annotation
|
|||||||
* @param $annotation
|
* @param $annotation
|
||||||
* @throws
|
* @throws
|
||||||
*/
|
*/
|
||||||
private function bindMiddleware($node, $annotation)
|
private function bindMiddleware(Node $node, $annotation)
|
||||||
{
|
{
|
||||||
if (!isset($annotation[1][2])) {
|
if (!isset($annotation[1][2])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$explode = explode(',', $annotation[1][2]);
|
$explode = explode(',', $annotation[1][2]);
|
||||||
foreach ($explode as $middleware) {
|
foreach ($explode as $middleware) {
|
||||||
|
if (strpos($middleware, '\\') !== 0) {
|
||||||
$middleware = 'App\Http\Middleware\\' . $middleware;
|
$middleware = 'App\Http\Middleware\\' . $middleware;
|
||||||
|
}
|
||||||
if (!class_exists($middleware)) {
|
if (!class_exists($middleware)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -137,14 +139,16 @@ class Annotation extends \Snowflake\Annotation\Annotation
|
|||||||
* @param $annotation
|
* @param $annotation
|
||||||
* @throws
|
* @throws
|
||||||
*/
|
*/
|
||||||
private function bindInterceptors($node, $annotation)
|
private function bindInterceptors(Node $node, $annotation)
|
||||||
{
|
{
|
||||||
if (!isset($annotation[1][2])) {
|
if (!isset($annotation[1][2])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$explode = explode(',', $annotation[1][2]);
|
$explode = explode(',', $annotation[1][2]);
|
||||||
foreach ($explode as $middleware) {
|
foreach ($explode as $middleware) {
|
||||||
|
if (strpos($middleware, '\\') !== 0) {
|
||||||
$middleware = 'App\Http\Interceptor\\' . $middleware;
|
$middleware = 'App\Http\Interceptor\\' . $middleware;
|
||||||
|
}
|
||||||
if (!class_exists($middleware)) {
|
if (!class_exists($middleware)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -162,7 +166,7 @@ class Annotation extends \Snowflake\Annotation\Annotation
|
|||||||
* @param $annotation
|
* @param $annotation
|
||||||
* @throws
|
* @throws
|
||||||
*/
|
*/
|
||||||
private function bindAfter($node, $annotation)
|
private function bindAfter(Node $node, $annotation)
|
||||||
{
|
{
|
||||||
if (!isset($annotation[1][2])) {
|
if (!isset($annotation[1][2])) {
|
||||||
return;
|
return;
|
||||||
@@ -170,7 +174,9 @@ class Annotation extends \Snowflake\Annotation\Annotation
|
|||||||
|
|
||||||
$explode = explode(',', $annotation[1][2]);
|
$explode = explode(',', $annotation[1][2]);
|
||||||
foreach ($explode as $middleware) {
|
foreach ($explode as $middleware) {
|
||||||
|
if (strpos($middleware, '\\') !== 0) {
|
||||||
$middleware = 'App\Http\After\\' . $middleware;
|
$middleware = 'App\Http\After\\' . $middleware;
|
||||||
|
}
|
||||||
if (!class_exists($middleware)) {
|
if (!class_exists($middleware)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -188,7 +194,7 @@ class Annotation extends \Snowflake\Annotation\Annotation
|
|||||||
* @param $annotation
|
* @param $annotation
|
||||||
* @throws
|
* @throws
|
||||||
*/
|
*/
|
||||||
private function bindLimits($node, $annotation)
|
private function bindLimits(Node $node, $annotation)
|
||||||
{
|
{
|
||||||
if (!isset($annotation[1][2])) {
|
if (!isset($annotation[1][2])) {
|
||||||
return;
|
return;
|
||||||
@@ -196,7 +202,9 @@ class Annotation extends \Snowflake\Annotation\Annotation
|
|||||||
|
|
||||||
$explode = explode(',', $annotation[1][2]);
|
$explode = explode(',', $annotation[1][2]);
|
||||||
foreach ($explode as $middleware) {
|
foreach ($explode as $middleware) {
|
||||||
|
if (strpos($middleware, '\\') !== 0) {
|
||||||
$middleware = 'App\Http\Limits\\' . $middleware;
|
$middleware = 'App\Http\Limits\\' . $middleware;
|
||||||
|
}
|
||||||
if (!class_exists($middleware)) {
|
if (!class_exists($middleware)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user