This commit is contained in:
2021-08-24 11:12:28 +08:00
parent 7c6af25309
commit 386e855939
+6 -7
View File
@@ -79,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 == 'json') {
return json_decode($data, true);
}
if ($this->_dataType == 'serializes') {
return unserialize($data);
}
return $data;
}
@@ -93,7 +93,6 @@ class Node
* @param $handler
* @param $path
* @return Node
* @throws NotFindClassException
* @throws ReflectionException
*/
public function setHandler($handler, $path): static