改名
This commit is contained in:
@@ -6,7 +6,6 @@ namespace HttpServer\Route;
|
||||
|
||||
|
||||
use Annotation\Aspect;
|
||||
use Annotation\Route\RpcProducer;
|
||||
use Closure;
|
||||
use Exception;
|
||||
use HttpServer\Exception\RequestException;
|
||||
@@ -80,12 +79,12 @@ class Node
|
||||
*/
|
||||
public function unpack(string $data): mixed
|
||||
{
|
||||
if ($this->_dataType == RpcProducer::PROTOCOL_JSON) {
|
||||
return json_decode($data, true);
|
||||
}
|
||||
if ($this->_dataType == RpcProducer::PROTOCOL_SERIALIZE) {
|
||||
return unserialize($data);
|
||||
}
|
||||
// if ($this->_dataType == RpcProducer::PROTOCOL_JSON) {
|
||||
// return json_decode($data, true);
|
||||
// }
|
||||
// if ($this->_dataType == RpcProducer::PROTOCOL_SERIALIZE) {
|
||||
// return unserialize($data);
|
||||
// }
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
@@ -537,6 +537,7 @@ class Router extends HttpService implements RouterInterface
|
||||
return null;
|
||||
}
|
||||
$node = $this->tree_search(['*'], $request->getMethod());
|
||||
var_dump($node, $request->getMethod());
|
||||
if (!($node instanceof Node)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user