改名
This commit is contained in:
@@ -63,8 +63,6 @@ use Snowflake\Snowflake;
|
||||
|
||||
$method = $this->event . '::' . (is_null($this->uri) ? 'event' : $this->uri);
|
||||
|
||||
var_dump($method);
|
||||
|
||||
$node = $router->addRoute($method, $handler, 'sw::socket');
|
||||
|
||||
return $this->add($node);
|
||||
|
||||
@@ -58,17 +58,18 @@ class Node extends Application
|
||||
* @return Node
|
||||
* @throws
|
||||
*/
|
||||
public function bindHandler($handler)
|
||||
public function bindHandler($handler): static
|
||||
{
|
||||
if ($handler instanceof Closure) {
|
||||
$this->handler = $handler;
|
||||
} else if (is_string($handler) && strpos($handler, '@') !== false) {
|
||||
} else if (is_string($handler) && str_contains($handler, '@')) {
|
||||
list($controller, $action) = explode('@', $handler);
|
||||
if (!empty($this->namespace)) {
|
||||
$controller = implode('\\', $this->namespace) . '\\' . $controller;
|
||||
}
|
||||
$this->handler = $this->getReflect($controller, $action);
|
||||
} else if ($handler != null && !is_callable($handler, true)) {
|
||||
var_dump($handler);
|
||||
$this->_error = 'Controller is con\'t exec.';
|
||||
} else {
|
||||
$this->handler = $handler;
|
||||
|
||||
@@ -471,7 +471,6 @@ class Server extends Application
|
||||
return;
|
||||
}
|
||||
foreach ($aliases as $alias) {
|
||||
var_dump($alias);
|
||||
$handler = $alias['handler'];
|
||||
foreach ($alias['attributes'] as $key => $attribute) {
|
||||
if ($attribute instanceof IAnnotation) {
|
||||
|
||||
Reference in New Issue
Block a user