改名
This commit is contained in:
@@ -8,6 +8,7 @@ namespace HttpServer\Route;
|
|||||||
use Annotation\Route\Middleware;
|
use Annotation\Route\Middleware;
|
||||||
use Closure;
|
use Closure;
|
||||||
use HttpServer\Abstracts\HttpService;
|
use HttpServer\Abstracts\HttpService;
|
||||||
|
use HttpServer\Controller;
|
||||||
use HttpServer\Http\Request;
|
use HttpServer\Http\Request;
|
||||||
use Exception;
|
use Exception;
|
||||||
|
|
||||||
@@ -80,11 +81,11 @@ class Node extends HttpService
|
|||||||
$this->_error = 'Controller is con\'t exec.';
|
$this->_error = 'Controller is con\'t exec.';
|
||||||
} else {
|
} else {
|
||||||
[$controller, $action] = $this->handler = $handler;
|
[$controller, $action] = $this->handler = $handler;
|
||||||
|
if ($controller instanceof Controller) {
|
||||||
|
$this->annotationInject(get_class($controller), $action);
|
||||||
|
|
||||||
$this->annotationInject(get_class($controller), $action);
|
$this->callback = Reduce::reduce($this->createDispatch(), $this->annotation());
|
||||||
}
|
}
|
||||||
if (!empty($this->handler)) {
|
|
||||||
$this->callback = Reduce::reduce($this->createDispatch(), $this->annotation());
|
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@@ -307,7 +308,6 @@ class Node extends HttpService
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Node $node
|
|
||||||
* @param string $className
|
* @param string $className
|
||||||
* @param string $action
|
* @param string $action
|
||||||
* @return Node
|
* @return Node
|
||||||
|
|||||||
Reference in New Issue
Block a user