改名
This commit is contained in:
@@ -7,6 +7,7 @@ namespace HttpServer\Events;
|
|||||||
use Annotation\Route\Socket;
|
use Annotation\Route\Socket;
|
||||||
use Exception;
|
use Exception;
|
||||||
use HttpServer\Abstracts\Callback;
|
use HttpServer\Abstracts\Callback;
|
||||||
|
use HttpServer\Http\Context;
|
||||||
use Snowflake\Event;
|
use Snowflake\Event;
|
||||||
use Snowflake\Exception\ComponentException;
|
use Snowflake\Exception\ComponentException;
|
||||||
use Snowflake\Snowflake;
|
use Snowflake\Snowflake;
|
||||||
@@ -63,7 +64,8 @@ class OnMessage extends Callback
|
|||||||
throw new Exception('Format error.');
|
throw new Exception('Format error.');
|
||||||
}
|
}
|
||||||
$router = Snowflake::app()->getRouter();
|
$router = Snowflake::app()->getRouter();
|
||||||
$node = $router->search('/' . Socket::MESSAGE . '::' . $route, 'sw::socket');
|
|
||||||
|
$node = $router->tree_search(explode('/', Socket::MESSAGE . '::' . $route), 'sw::socket');
|
||||||
if ($node === null) {
|
if ($node === null) {
|
||||||
throw new Exception('Page not found.');
|
throw new Exception('Page not found.');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ use Exception;
|
|||||||
use HttpServer\Application;
|
use HttpServer\Application;
|
||||||
use HttpServer\IInterface\AuthIdentity;
|
use HttpServer\IInterface\AuthIdentity;
|
||||||
|
|
||||||
|
use JetBrains\PhpStorm\Pure;
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
use Snowflake\Core\Json;
|
use Snowflake\Core\Json;
|
||||||
use Snowflake\Exception\ComponentException;
|
use Snowflake\Exception\ComponentException;
|
||||||
@@ -202,7 +203,7 @@ class Request extends Application
|
|||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getCurrent(): string
|
#[Pure] public function getCurrent(): string
|
||||||
{
|
{
|
||||||
return current($this->explode);
|
return current($this->explode);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user