hypertube-binaries 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Binaries/Clr/Hypertube.Clr.Utils.dll +0 -0
- package/Binaries/Clr/HypertubeClrRuntime.dll +0 -0
- package/Binaries/Jvm/HypertubeJvmRuntime.jar +0 -0
- package/Binaries/Native/Linux/ARM64/{_HypertubeNativeErrorLogger_2026-03-25.txt → _HypertubeNativeErrorLogger_2026-03-31.txt} +1 -1
- package/Binaries/Native/Linux/ARM64/libHypertubeActivationService.so +0 -0
- package/Binaries/Native/Linux/ARM64/libUtils.so +0 -0
- package/Binaries/Native/Linux/ARM64/version.txt +1 -1
- package/Binaries/Native/Linux/X64/{_HypertubeNativeErrorLogger_2026-03-25.txt → _HypertubeNativeErrorLogger_2026-03-31.txt} +1 -1
- package/Binaries/Native/Linux/X64/libHypertubeActivationService.so +0 -0
- package/Binaries/Native/Linux/X64/libHypertubeNodejs2218RuntimeNative.so +0 -0
- package/Binaries/Native/Linux/X64/libUtils.so +0 -0
- package/Binaries/Native/Linux/X64/version.txt +1 -1
- package/Binaries/Native/MacOs/ARM64/_HypertubeNativeErrorLogger_2026-03-31.txt +2 -0
- package/Binaries/Native/MacOs/ARM64/libHypertubeActivationService.dylib +0 -0
- package/Binaries/Native/MacOs/ARM64/libHypertubeNodejs2218RuntimeNative.dylib +0 -0
- package/Binaries/Native/MacOs/ARM64/libUtils.dylib +0 -0
- package/Binaries/Native/MacOs/ARM64/version.txt +1 -1
- package/Binaries/Native/MacOs/X64/{_HypertubeNativeErrorLogger_2026-03-25.txt → _HypertubeNativeErrorLogger_2026-03-31.txt} +1 -1
- package/Binaries/Native/MacOs/X64/libHypertubeActivationService.dylib +0 -0
- package/Binaries/Native/MacOs/X64/libHypertubeNodejs2218RuntimeNative.dylib +0 -0
- package/Binaries/Native/MacOs/X64/libUtils.dylib +0 -0
- package/Binaries/Native/MacOs/X64/version.txt +1 -1
- package/Binaries/Native/Windows/ARM64/Configs.dll +0 -0
- package/Binaries/Native/Windows/ARM64/HypertubeActivationService.dll +0 -0
- package/Binaries/Native/Windows/ARM64/HypertubeCppRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/ARM64/HypertubeGoRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/ARM64/HypertubeJvmRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/ARM64/HypertubeNetcoreRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/ARM64/HypertubePhpRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/ARM64/HypertubePythonRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/ARM64/HypertubeRubyRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/ARM64/HypertubeTcpClient.dll +0 -0
- package/Binaries/Native/Windows/ARM64/HypertubeTcpTlsClient.dll +0 -0
- package/Binaries/Native/Windows/ARM64/Utils.dll +0 -0
- package/Binaries/Native/Windows/ARM64/_HypertubeNativeErrorLogger_2026-03-31.txt +2 -0
- package/Binaries/Native/Windows/ARM64/version.txt +0 -0
- package/Binaries/Native/Windows/X64/Configs.dll +0 -0
- package/Binaries/Native/Windows/X64/HypertubeActivationService.dll +0 -0
- package/Binaries/Native/Windows/X64/HypertubeClrRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X64/HypertubeCppRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X64/HypertubeGoRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X64/HypertubeJvmRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X64/HypertubeNetcoreRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X64/HypertubeNodejs2218RuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X64/HypertubeNodejsRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X64/HypertubePhp848RuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X64/HypertubePhpRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X64/HypertubePythonRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X64/HypertubeRubyRuntimeNative.dll +0 -0
- package/Binaries/Native/Windows/X64/HypertubeTcpClient.dll +0 -0
- package/Binaries/Native/Windows/X64/HypertubeTcpTlsClient.dll +0 -0
- package/Binaries/Native/Windows/X64/Utils.dll +0 -0
- package/Binaries/Native/Windows/X64/_HypertubeNativeErrorLogger_2026-03-31.txt +2 -0
- package/Binaries/Native/Windows/X64/version.txt +1 -1
- package/Binaries/Netcore/Hypertube.Netcore.Core.dll +0 -0
- package/Binaries/Netcore/Hypertube.Netcore.Plugins.dll +0 -0
- package/Binaries/Netcore/Hypertube.Netcore.Utils.dll +0 -0
- package/Binaries/Php/hypertube/core/handler/AbstractHandler.php +9 -0
- package/Binaries/Php/hypertube/core/handler/ArrayGetRankHandler.php +1 -1
- package/Binaries/Php/hypertube/core/handler/ArrayGetSizeHandler.php +1 -1
- package/Binaries/Php/hypertube/core/handler/ArraySetItemHandler.php +2 -4
- package/Binaries/Php/hypertube/core/handler/CastHandler.php +2 -5
- package/Binaries/Php/hypertube/core/handler/ConvertTypeHandler.php +1 -7
- package/Binaries/Php/hypertube/core/handler/CreateInstanceHandler.php +1 -6
- package/Binaries/Php/hypertube/core/handler/DestructReferenceHandler.php +14 -1
- package/Binaries/Php/hypertube/core/handler/EnableNamespaceHandler.php +1 -7
- package/Binaries/Php/hypertube/core/handler/EnableTypeHandler.php +1 -4
- package/Binaries/Php/hypertube/core/handler/GetInstanceFieldHandler.php +1 -7
- package/Binaries/Php/hypertube/core/handler/GetInstanceMethodAsDelegateHandler.php +1 -7
- package/Binaries/Php/hypertube/core/handler/GetStaticFieldHandler.php +1 -7
- package/Binaries/Php/hypertube/core/handler/GetStaticMethodAsDelegateHandler.php +1 -7
- package/Binaries/Php/hypertube/core/handler/GetTypeHandler.php +1 -7
- package/Binaries/Php/hypertube/core/handler/Handler.php +5 -43
- package/Binaries/Php/hypertube/core/handler/InvokeDelegateHandler.php +1 -7
- package/Binaries/Php/hypertube/core/handler/InvokeGenericMethodHandler.php +1 -4
- package/Binaries/Php/hypertube/core/handler/InvokeGenericStaticMethodHandler.php +1 -7
- package/Binaries/Php/hypertube/core/handler/InvokeGlobalFunctionHandler.php +1 -7
- package/Binaries/Php/hypertube/core/handler/InvokeInstanceMethodHandler.php +2 -8
- package/Binaries/Php/hypertube/core/handler/InvokeStaticMethodHandler.php +1 -7
- package/Binaries/Php/hypertube/core/handler/LoadLibraryHandler.php +1 -7
- package/Binaries/Php/hypertube/core/handler/PassByValueHandler.php +103 -0
- package/Binaries/Php/hypertube/core/handler/PassDelegateHandler.php +1 -4
- package/Binaries/Php/hypertube/core/handler/ProjectResultAsDtoHandler.php +1 -4
- package/Binaries/Php/hypertube/core/handler/RegisterForUpdateHandler.php +2 -5
- package/Binaries/Php/hypertube/core/handler/ResolveInstanceHandler.php +1 -7
- package/Binaries/Php/hypertube/core/handler/RetrieveArrayHandler.php +48 -0
- package/Binaries/Php/hypertube/core/handler/SetInstanceFieldHandler.php +21 -8
- package/Binaries/Php/hypertube/core/handler/SetStaticFieldHandler.php +1 -7
- package/Binaries/Php/hypertube/core/protocol/CommandSerializer.php +1 -1
- package/Binaries/Php/hypertube/{core/referencecache → utils}/ArrayWrapper.php +1 -1
- package/Binaries/Php/hypertube/utils/Command.php +0 -5
- package/Binaries/Php/hypertube/utils/CommandInterface.php +0 -1
- package/Binaries/Php/hypertube/utils/type/CommandType.php +4 -3
- package/Binaries/Python/hypertube/core/handler/AbstractHandler.py +30 -1
- package/Binaries/Python/hypertube/core/handler/AddEventListenerHandler.py +2 -2
- package/Binaries/Python/hypertube/core/handler/ArrayGetItemHandler.py +3 -4
- package/Binaries/Python/hypertube/core/handler/ArrayGetRankHandler.py +3 -4
- package/Binaries/Python/hypertube/core/handler/ArrayGetSizeHandler.py +3 -4
- package/Binaries/Python/hypertube/core/handler/ArrayHandler.py +2 -2
- package/Binaries/Python/hypertube/core/handler/ArrayReferenceHandler.py +2 -2
- package/Binaries/Python/hypertube/core/handler/ArraySetItemHandler.py +3 -4
- package/Binaries/Python/hypertube/core/handler/AsDtoHandler.py +2 -2
- package/Binaries/Python/hypertube/core/handler/AsOutHandler.py +2 -2
- package/Binaries/Python/hypertube/core/handler/AsRefHandler.py +2 -2
- package/Binaries/Python/hypertube/core/handler/CastingHandler.py +2 -2
- package/Binaries/Python/hypertube/core/handler/ConvertTypeHandler.py +2 -2
- package/Binaries/Python/hypertube/core/handler/CreateClassInstanceHandler.py +3 -4
- package/Binaries/Python/hypertube/core/handler/CreateNullHandler.py +2 -2
- package/Binaries/Python/hypertube/core/handler/DestructReferenceHandler.py +5 -3
- package/Binaries/Python/hypertube/core/handler/DtoPropertyHandler.py +2 -2
- package/Binaries/Python/hypertube/core/handler/EnableNamespaceHandler.py +3 -4
- package/Binaries/Python/hypertube/core/handler/EnableTypeHandler.py +3 -4
- package/Binaries/Python/hypertube/core/handler/ExceptionHandler.py +2 -2
- package/Binaries/Python/hypertube/core/handler/GenerateLibHandler.py +2 -2
- package/Binaries/Python/hypertube/core/handler/GetAsyncOperationResultHandler.py +2 -2
- package/Binaries/Python/hypertube/core/handler/GetEnumItemHandler.py +3 -4
- package/Binaries/Python/hypertube/core/handler/GetEnumNameHandler.py +3 -4
- package/Binaries/Python/hypertube/core/handler/GetEnumValueHandler.py +3 -4
- package/Binaries/Python/hypertube/core/handler/GetGlobalFieldHandler.py +6 -4
- package/Binaries/Python/hypertube/core/handler/GetInstanceFieldHandler.py +3 -4
- package/Binaries/Python/hypertube/core/handler/GetInstanceMethodAsDelegateHandler.py +3 -4
- package/Binaries/Python/hypertube/core/handler/GetKwargHandler.py +4 -5
- package/Binaries/Python/hypertube/core/handler/GetModuleHandler.py +2 -2
- package/Binaries/Python/hypertube/core/handler/GetRefValueHandler.py +2 -2
- package/Binaries/Python/hypertube/core/handler/GetResultTypeHandler.py +3 -2
- package/Binaries/Python/hypertube/core/handler/GetStaticFieldHandler.py +3 -4
- package/Binaries/Python/hypertube/core/handler/GetStaticMethodAsDelegateHandler.py +3 -4
- package/Binaries/Python/hypertube/core/handler/GetTypeHandler.py +3 -4
- package/Binaries/Python/hypertube/core/handler/Handler.py +24 -28
- package/Binaries/Python/hypertube/core/handler/HeartBeatHandler.py +2 -2
- package/Binaries/Python/hypertube/core/handler/InvokeDelegateHandler.py +3 -4
- package/Binaries/Python/hypertube/core/handler/InvokeGenericMethodHandler.py +2 -2
- package/Binaries/Python/hypertube/core/handler/InvokeGenericStaticMethodHandler.py +2 -2
- package/Binaries/Python/hypertube/core/handler/InvokeGlobalFunctionHandler.py +7 -5
- package/Binaries/Python/hypertube/core/handler/InvokeInstanceMethodHandler.py +3 -4
- package/Binaries/Python/hypertube/core/handler/InvokeStaticMethodHandler.py +3 -4
- package/Binaries/Python/hypertube/core/handler/LoadLibraryHandler.py +6 -4
- package/Binaries/Python/hypertube/core/handler/OptimizeHandler.py +2 -2
- package/Binaries/Python/hypertube/core/handler/PassByValueHandler.py +58 -0
- package/Binaries/Python/hypertube/core/handler/PassDelegateHandler.py +3 -4
- package/Binaries/Python/hypertube/core/handler/PluginWrapperHandler.py +2 -2
- package/Binaries/Python/hypertube/core/handler/ProjectResultAsDtoHandler.py +3 -4
- package/Binaries/Python/hypertube/core/handler/RegisterForUpdateHandler.py +6 -4
- package/Binaries/Python/hypertube/core/handler/ResolveInstanceHandler.py +5 -5
- package/Binaries/Python/hypertube/core/handler/RetrieveArrayHandler.py +26 -3
- package/Binaries/Python/hypertube/core/handler/SetInstanceFieldHandler.py +23 -11
- package/Binaries/Python/hypertube/core/handler/SetStaticFieldHandler.py +3 -4
- package/Binaries/Python/hypertube/core/handler/ValueForUpdateHandler.py +2 -2
- package/Binaries/Python/hypertube/core/handler/ValueHandler.py +2 -2
- package/Binaries/Python/hypertube/core/protocol/CommandSerializer.py +1 -1
- package/Binaries/Python/hypertube/utils/Command.py +0 -8
- package/Binaries/Python/hypertube/utils/CommandType.py +4 -3
- package/Binaries/Ruby/core/handler/abstract_handler.rb +26 -2
- package/Binaries/Ruby/core/handler/add_event_listener_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/array_get_item_handler.rb +3 -3
- package/Binaries/Ruby/core/handler/array_get_rank_handler.rb +3 -3
- package/Binaries/Ruby/core/handler/array_get_size_handler.rb +3 -3
- package/Binaries/Ruby/core/handler/array_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/array_reference_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/array_set_item_handler.rb +3 -3
- package/Binaries/Ruby/core/handler/as_dto_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/as_kwargs_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/as_out_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/as_ref_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/casting_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/convert_type_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/create_class_instance_handler.rb +3 -3
- package/Binaries/Ruby/core/handler/create_null_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/destruct_reference_handler.rb +8 -2
- package/Binaries/Ruby/core/handler/dto_property_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/enable_namespace_handler.rb +3 -5
- package/Binaries/Ruby/core/handler/enable_type_handler.rb +3 -3
- package/Binaries/Ruby/core/handler/exception_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/generate_lib_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/get_async_operation_result_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/get_enum_item_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/get_enum_name_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/get_enum_value_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/get_global_field_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/get_instance_field_handler.rb +3 -3
- package/Binaries/Ruby/core/handler/get_instance_method_as_delegate_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/get_module_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/get_ref_value_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/get_result_type_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/get_static_field_handler.rb +3 -3
- package/Binaries/Ruby/core/handler/get_static_method_as_delegate_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/get_type_handler.rb +3 -3
- package/Binaries/Ruby/core/handler/handler.rb +9 -9
- package/Binaries/Ruby/core/handler/heartbeat_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/invoke_delegate_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/invoke_generic_method_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/invoke_generic_static_method_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/invoke_global_function_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/invoke_instance_method_handler.rb +3 -5
- package/Binaries/Ruby/core/handler/invoke_static_method_handler.rb +3 -3
- package/Binaries/Ruby/core/handler/load_library_handler.rb +3 -3
- package/Binaries/Ruby/core/handler/optimize_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/pass_by_value_handler.rb +56 -0
- package/Binaries/Ruby/core/handler/pass_delegate_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/plugin_wrapper_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/project_result_as_dto_handler.rb +4 -2
- package/Binaries/Ruby/core/handler/register_for_update_handler.rb +3 -5
- package/Binaries/Ruby/core/handler/resolve_instance_handler.rb +4 -5
- package/Binaries/Ruby/core/handler/retrieve_array_handler.rb +31 -4
- package/Binaries/Ruby/core/handler/set_instance_field_handler.rb +19 -11
- package/Binaries/Ruby/core/handler/set_static_field_handler.rb +3 -5
- package/Binaries/Ruby/core/handler/value_for_update_handler.rb +2 -2
- package/Binaries/Ruby/core/handler/value_handler.rb +2 -2
- package/Binaries/Ruby/core/protocol/command_serializer.rb +1 -1
- package/Binaries/Ruby/utils/command.rb +0 -4
- package/Binaries/Ruby/utils/command_type.rb +6 -3
- package/Binaries/version.txt +1 -1
- package/package.json +1 -1
- package/prebuilds/prebuilds-darwin-arm64/HypertubeNodejsRuntimeAddon.node +0 -0
- package/prebuilds/prebuilds-darwin-x64/HypertubeNodejsRuntimeAddon.node +0 -0
- package/prebuilds/prebuilds-win32-arm64/HypertubeNodejsRuntimeAddon.node +0 -0
- package/prebuilds/prebuilds-win32-x64/HypertubeNodejsRuntimeAddon.node +0 -0
- package/Binaries/Native/MacOs/ARM64/_HypertubeNativeErrorLogger_2026-03-25.txt +0 -2
- package/Binaries/Native/Windows/ARM64/_HypertubeNativeErrorLogger_2026-03-25.txt +0 -2
- package/Binaries/Native/Windows/X64/_HypertubeNativeErrorLogger_2026-03-25.txt +0 -2
- package/Binaries/Python/hypertube/core/handler/AbstractCommandHandler.py +0 -20
- package/Binaries/Ruby/core/handler/abstract_command_handler.rb +0 -24
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
2026-03-
|
|
1
|
+
2026-03-31 14:03:08 Thread ID: 278562404543008 Configuration source is not a valid JSON. Check your configuration:
|
|
2
2
|
./config2.json
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
3.0.
|
|
1
|
+
3.0.1
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
2026-03-
|
|
1
|
+
2026-03-31 14:03:58 Thread ID: 140496838338368 Configuration source is not a valid JSON. Check your configuration:
|
|
2
2
|
./config2.json
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
3.0.
|
|
1
|
+
3.0.1
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
3.0.
|
|
1
|
+
3.0.1
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
2026-03-
|
|
1
|
+
2026-03-31 14:04:52 Thread ID: 0x7ff849b8c840 Configuration source is not a valid JSON. Check your configuration:
|
|
2
2
|
./config2.json
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
3.0.
|
|
1
|
+
3.0.1
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'3.0.
|
|
1
|
+
'3.0.1'
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -5,6 +5,7 @@ declare(strict_types=1);
|
|
|
5
5
|
namespace core\handler;
|
|
6
6
|
|
|
7
7
|
use utils\CommandInterface;
|
|
8
|
+
use utils\exception\HypertubeArgumentsMismatchException;
|
|
8
9
|
use utils\type\CommandType;
|
|
9
10
|
|
|
10
11
|
abstract class AbstractHandler
|
|
@@ -49,4 +50,12 @@ abstract class AbstractHandler
|
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
}
|
|
53
|
+
|
|
54
|
+
protected function validate(CommandInterface $command, int $requiredParametersCount, string $callerTypeName): void
|
|
55
|
+
{
|
|
56
|
+
if ($command->getPayloadSize() < $requiredParametersCount) {
|
|
57
|
+
throw new HypertubeArgumentsMismatchException($callerTypeName, $requiredParametersCount);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
52
61
|
}
|
|
@@ -5,8 +5,8 @@ declare(strict_types=1);
|
|
|
5
5
|
namespace core\handler;
|
|
6
6
|
|
|
7
7
|
use ArrayAccess;
|
|
8
|
-
use core\referencecache\ArrayWrapper;
|
|
9
8
|
use Exception;
|
|
9
|
+
use utils\ArrayWrapper;
|
|
10
10
|
use utils\CommandInterface;
|
|
11
11
|
|
|
12
12
|
final class ArraySetItemHandler extends AbstractHandler
|
|
@@ -19,9 +19,7 @@ final class ArraySetItemHandler extends AbstractHandler
|
|
|
19
19
|
public function process(CommandInterface $command)
|
|
20
20
|
{
|
|
21
21
|
try {
|
|
22
|
-
|
|
23
|
-
throw new Exception('ArraySetItemHandler parameters mismatch!');
|
|
24
|
-
}
|
|
22
|
+
$this->validate($command, self::REQUIRED_PARAMETERS_COUNT, self::class);
|
|
25
23
|
|
|
26
24
|
$payload = $command->getPayload();
|
|
27
25
|
$data = $payload[0];
|
|
@@ -6,7 +6,6 @@ namespace core\handler;
|
|
|
6
6
|
|
|
7
7
|
use TypeError;
|
|
8
8
|
use utils\CommandInterface;
|
|
9
|
-
use utils\exception\HypertubeArgumentsMismatchException;
|
|
10
9
|
|
|
11
10
|
final class CastHandler extends AbstractHandler
|
|
12
11
|
{
|
|
@@ -17,11 +16,9 @@ final class CastHandler extends AbstractHandler
|
|
|
17
16
|
*/
|
|
18
17
|
public function process(CommandInterface $command)
|
|
19
18
|
{
|
|
20
|
-
$
|
|
21
|
-
if ($command->getPayloadSize() !== self::REQUIRED_ARGUMENTS_COUNT) {
|
|
22
|
-
throw new HypertubeArgumentsMismatchException(self::class, self::REQUIRED_ARGUMENTS_COUNT);
|
|
23
|
-
}
|
|
19
|
+
$this->validate($command, self::REQUIRED_ARGUMENTS_COUNT, self::class);
|
|
24
20
|
|
|
21
|
+
$payload = $command->getPayload();
|
|
25
22
|
$newType = $payload[0];
|
|
26
23
|
$value = $payload[1];
|
|
27
24
|
|
|
@@ -5,7 +5,6 @@ declare(strict_types=1);
|
|
|
5
5
|
namespace core\handler;
|
|
6
6
|
|
|
7
7
|
use utils\CommandInterface;
|
|
8
|
-
use utils\exception\HypertubeArgumentsMismatchException;
|
|
9
8
|
use utils\TypesHandler;
|
|
10
9
|
|
|
11
10
|
final class ConvertTypeHandler extends AbstractHandler
|
|
@@ -14,12 +13,7 @@ final class ConvertTypeHandler extends AbstractHandler
|
|
|
14
13
|
|
|
15
14
|
public function process(CommandInterface $command): string
|
|
16
15
|
{
|
|
17
|
-
|
|
18
|
-
throw new HypertubeArgumentsMismatchException(
|
|
19
|
-
self::class,
|
|
20
|
-
self::REQUIRED_ARGUMENTS_COUNT
|
|
21
|
-
);
|
|
22
|
-
}
|
|
16
|
+
$this->validate($command, self::REQUIRED_ARGUMENTS_COUNT, self::class);
|
|
23
17
|
|
|
24
18
|
return TypesHandler::convertTypeToHypertubeType($command->getPayload()[0]);
|
|
25
19
|
}
|
|
@@ -10,7 +10,6 @@ use ReflectionException;
|
|
|
10
10
|
use ReflectionMethod;
|
|
11
11
|
use ReflectionType;
|
|
12
12
|
use utils\CommandInterface;
|
|
13
|
-
use utils\exception\HypertubeArgumentsMismatchException;
|
|
14
13
|
|
|
15
14
|
final class CreateInstanceHandler extends AbstractHandler
|
|
16
15
|
{
|
|
@@ -21,11 +20,7 @@ final class CreateInstanceHandler extends AbstractHandler
|
|
|
21
20
|
*/
|
|
22
21
|
public function process(CommandInterface $command)
|
|
23
22
|
{
|
|
24
|
-
|
|
25
|
-
throw new HypertubeArgumentsMismatchException(
|
|
26
|
-
self::class, self::REQUIRED_ARGUMENTS_COUNT
|
|
27
|
-
);
|
|
28
|
-
}
|
|
23
|
+
$this->validate($command, self::REQUIRED_ARGUMENTS_COUNT, self::class);
|
|
29
24
|
|
|
30
25
|
$payload = $command->getPayload();
|
|
31
26
|
$arguments = [];
|
|
@@ -11,6 +11,19 @@ final class DestructReferenceHandler extends AbstractHandler
|
|
|
11
11
|
{
|
|
12
12
|
public function process(CommandInterface $command): bool
|
|
13
13
|
{
|
|
14
|
-
|
|
14
|
+
try {
|
|
15
|
+
if ($command->getPayloadSize() < 1) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
$referenceId = $command->getPayload()[0] ?? null;
|
|
20
|
+
if (!is_string($referenceId)) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return ReferencesCache::getInstance()->deleteReference($referenceId);
|
|
25
|
+
} catch (\Throwable $e) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
15
28
|
}
|
|
16
29
|
}
|
|
@@ -6,7 +6,6 @@ namespace core\handler;
|
|
|
6
6
|
|
|
7
7
|
use core\namespacescache\NamespacesCache;
|
|
8
8
|
use utils\CommandInterface;
|
|
9
|
-
use utils\exception\HypertubeArgumentsMismatchException;
|
|
10
9
|
|
|
11
10
|
final class EnableNamespaceHandler extends AbstractHandler
|
|
12
11
|
{
|
|
@@ -14,12 +13,7 @@ final class EnableNamespaceHandler extends AbstractHandler
|
|
|
14
13
|
|
|
15
14
|
public function process(CommandInterface $command): int
|
|
16
15
|
{
|
|
17
|
-
|
|
18
|
-
throw new HypertubeArgumentsMismatchException(
|
|
19
|
-
self::class,
|
|
20
|
-
self::REQUIRED_ARGUMENTS_COUNT
|
|
21
|
-
);
|
|
22
|
-
}
|
|
16
|
+
$this->validate($command, self::REQUIRED_ARGUMENTS_COUNT, self::class);
|
|
23
17
|
|
|
24
18
|
$namespacesCache = NamespacesCache::getInstance();
|
|
25
19
|
|
|
@@ -6,7 +6,6 @@ namespace core\handler;
|
|
|
6
6
|
|
|
7
7
|
use core\typescache\TypesCache;
|
|
8
8
|
use utils\CommandInterface;
|
|
9
|
-
use utils\exception\HypertubeArgumentsMismatchException;
|
|
10
9
|
|
|
11
10
|
final class EnableTypeHandler extends AbstractHandler
|
|
12
11
|
{
|
|
@@ -14,9 +13,7 @@ final class EnableTypeHandler extends AbstractHandler
|
|
|
14
13
|
|
|
15
14
|
public function process(CommandInterface $command): int
|
|
16
15
|
{
|
|
17
|
-
|
|
18
|
-
throw new HypertubeArgumentsMismatchException(self::class, self::REQUIRED_ARGUMENTS_COUNT);
|
|
19
|
-
}
|
|
16
|
+
$this->validate($command, self::REQUIRED_ARGUMENTS_COUNT, self::class);
|
|
20
17
|
|
|
21
18
|
$typesCache = TypesCache::getInstance();
|
|
22
19
|
foreach ($command->getPayload() as $payload) {
|
|
@@ -9,7 +9,6 @@ use ReflectionException;
|
|
|
9
9
|
use Exception;
|
|
10
10
|
use SebastianBergmann\CodeCoverage\Report\PHP;
|
|
11
11
|
use utils\CommandInterface;
|
|
12
|
-
use utils\exception\HypertubeArgumentsMismatchException;
|
|
13
12
|
|
|
14
13
|
final class GetInstanceFieldHandler extends AbstractHandler
|
|
15
14
|
{
|
|
@@ -20,12 +19,7 @@ final class GetInstanceFieldHandler extends AbstractHandler
|
|
|
20
19
|
*/
|
|
21
20
|
public function process(CommandInterface $command)
|
|
22
21
|
{
|
|
23
|
-
|
|
24
|
-
throw new HypertubeArgumentsMismatchException(
|
|
25
|
-
self::class,
|
|
26
|
-
self::REQUIRED_ARGUMENTS_COUNT
|
|
27
|
-
);
|
|
28
|
-
}
|
|
22
|
+
$this->validate($command, self::REQUIRED_ARGUMENTS_COUNT, self::class);
|
|
29
23
|
|
|
30
24
|
$objectClass = $command->getPayload()[0];
|
|
31
25
|
$fieldString = (string)$command->getPayload()[1];
|
|
@@ -8,7 +8,6 @@ use ReflectionClass;
|
|
|
8
8
|
use ReflectionException;
|
|
9
9
|
use ReflectionMethod;
|
|
10
10
|
use utils\CommandInterface;
|
|
11
|
-
use utils\exception\HypertubeArgumentsMismatchException;
|
|
12
11
|
|
|
13
12
|
final class GetInstanceMethodAsDelegateHandler extends AbstractHandler
|
|
14
13
|
{
|
|
@@ -16,12 +15,7 @@ final class GetInstanceMethodAsDelegateHandler extends AbstractHandler
|
|
|
16
15
|
|
|
17
16
|
public function process(CommandInterface $command): ReflectionMethod
|
|
18
17
|
{
|
|
19
|
-
|
|
20
|
-
throw new HypertubeArgumentsMismatchException(
|
|
21
|
-
self::class,
|
|
22
|
-
self::REQUIRED_ARGUMENTS_COUNT
|
|
23
|
-
);
|
|
24
|
-
}
|
|
18
|
+
$this->validate($command, self::REQUIRED_ARGUMENTS_COUNT, self::class);
|
|
25
19
|
|
|
26
20
|
$objectInstance = $command->getPayload()[0];
|
|
27
21
|
$methodToInvoke = (string) $command->getPayload()[1];
|
|
@@ -8,7 +8,6 @@ use Exception;
|
|
|
8
8
|
use ReflectionClass;
|
|
9
9
|
use ReflectionException;
|
|
10
10
|
use utils\CommandInterface;
|
|
11
|
-
use utils\exception\HypertubeArgumentsMismatchException;
|
|
12
11
|
|
|
13
12
|
final class GetStaticFieldHandler extends AbstractHandler
|
|
14
13
|
{
|
|
@@ -19,12 +18,7 @@ final class GetStaticFieldHandler extends AbstractHandler
|
|
|
19
18
|
*/
|
|
20
19
|
public function process(CommandInterface $command)
|
|
21
20
|
{
|
|
22
|
-
|
|
23
|
-
throw new HypertubeArgumentsMismatchException(
|
|
24
|
-
self::class,
|
|
25
|
-
self::REQUIRED_ARGUMENTS_COUNT
|
|
26
|
-
);
|
|
27
|
-
}
|
|
21
|
+
$this->validate($command, self::REQUIRED_ARGUMENTS_COUNT, self::class);
|
|
28
22
|
|
|
29
23
|
$classToLoad = $command->getPayload()[0];
|
|
30
24
|
$field = (string) $command->getPayload()[1];
|
|
@@ -9,7 +9,6 @@ use ReflectionException;
|
|
|
9
9
|
use ReflectionMethod;
|
|
10
10
|
use ReflectionType;
|
|
11
11
|
use utils\CommandInterface;
|
|
12
|
-
use utils\exception\HypertubeArgumentsMismatchException;
|
|
13
12
|
|
|
14
13
|
final class GetStaticMethodAsDelegateHandler extends AbstractHandler
|
|
15
14
|
{
|
|
@@ -17,12 +16,7 @@ final class GetStaticMethodAsDelegateHandler extends AbstractHandler
|
|
|
17
16
|
|
|
18
17
|
public function process(CommandInterface $command): ReflectionMethod
|
|
19
18
|
{
|
|
20
|
-
|
|
21
|
-
throw new HypertubeArgumentsMismatchException(
|
|
22
|
-
self::class,
|
|
23
|
-
self::REQUIRED_ARGUMENTS_COUNT
|
|
24
|
-
);
|
|
25
|
-
}
|
|
19
|
+
$this->validate($command, self::REQUIRED_ARGUMENTS_COUNT, self::class);
|
|
26
20
|
|
|
27
21
|
$payload = $command->getPayload();
|
|
28
22
|
$classToLoad = $payload[0];
|
|
@@ -10,7 +10,6 @@ use core\typescache\TypesCache;
|
|
|
10
10
|
use Exception;
|
|
11
11
|
use ReflectionClass;
|
|
12
12
|
use utils\CommandInterface;
|
|
13
|
-
use utils\exception\HypertubeArgumentsMismatchException;
|
|
14
13
|
|
|
15
14
|
final class GetTypeHandler extends AbstractHandler
|
|
16
15
|
{
|
|
@@ -36,12 +35,7 @@ final class GetTypeHandler extends AbstractHandler
|
|
|
36
35
|
|
|
37
36
|
public function process(CommandInterface $command)
|
|
38
37
|
{
|
|
39
|
-
|
|
40
|
-
throw new HypertubeArgumentsMismatchException(
|
|
41
|
-
self::class,
|
|
42
|
-
self::REQUIRED_ARGUMENTS_COUNT
|
|
43
|
-
);
|
|
44
|
-
}
|
|
38
|
+
$this->validate($command, self::REQUIRED_ARGUMENTS_COUNT, self::class);
|
|
45
39
|
|
|
46
40
|
$typeName = $this->getTypeName($command);
|
|
47
41
|
|
|
@@ -4,17 +4,15 @@ declare(strict_types=1);
|
|
|
4
4
|
|
|
5
5
|
namespace core\handler;
|
|
6
6
|
|
|
7
|
-
use ArrayObject;
|
|
8
7
|
use core\referencecache\ReferencesCache;
|
|
9
|
-
use core\referencecache\ArrayWrapper;
|
|
10
8
|
use Throwable;
|
|
11
|
-
use TypeError;
|
|
12
9
|
use utils\Command;
|
|
13
10
|
use utils\CommandInterface;
|
|
14
11
|
use utils\ExceptionSerializer;
|
|
15
12
|
use utils\RuntimeName;
|
|
16
13
|
use utils\type\CommandType;
|
|
17
14
|
use utils\TypesHandler;
|
|
15
|
+
use utils\ArrayWrapper;
|
|
18
16
|
|
|
19
17
|
final class Handler
|
|
20
18
|
{
|
|
@@ -54,7 +52,7 @@ final class Handler
|
|
|
54
52
|
self::$handlers[CommandType::ARRAY_GET_RANK()->getValue()] = new ArrayGetRankHandler();
|
|
55
53
|
self::$handlers[CommandType::ARRAY_SET_ITEM()->getValue()] = new ArraySetItemHandler();
|
|
56
54
|
self::$handlers[CommandType::ARRAY()->getValue()] = new ArrayHandler();
|
|
57
|
-
self::$handlers[CommandType::RETRIEVE_ARRAY()->getValue()] =
|
|
55
|
+
self::$handlers[CommandType::RETRIEVE_ARRAY()->getValue()] = new RetrieveArrayHandler();
|
|
58
56
|
self::$handlers[CommandType::SET_INSTANCE_FIELD()->getValue()] = new SetInstanceFieldHandler();
|
|
59
57
|
self::$handlers[CommandType::INVOKE_GENERIC_STATIC_METHOD()->getValue()] = new InvokeGenericStaticMethodHandler();
|
|
60
58
|
self::$handlers[CommandType::INVOKE_GENERIC_METHOD()->getValue()] = new InvokeGenericMethodHandler();
|
|
@@ -83,6 +81,7 @@ final class Handler
|
|
|
83
81
|
self::$handlers[CommandType::AS_DTO()->getValue()] = new AsDtoHandler();
|
|
84
82
|
self::$handlers[CommandType::DTO_PROPERTY()->getValue()] = new DtoPropertyHandler();
|
|
85
83
|
self::$handlers[CommandType::PROJECT_RESULT_AS_DTO()->getValue()] = new ProjectResultAsDtoHandler();
|
|
84
|
+
self::$handlers[CommandType::PASS_BY_VALUE()->getValue()] = new PassByValueHandler();
|
|
86
85
|
}
|
|
87
86
|
|
|
88
87
|
public static function getHandlers(): array
|
|
@@ -95,17 +94,9 @@ final class Handler
|
|
|
95
94
|
{
|
|
96
95
|
self::initializeHandlers();
|
|
97
96
|
try {
|
|
98
|
-
if ($command->getCommandType()->equalsByValue(CommandType::RETRIEVE_ARRAY)) {
|
|
99
|
-
return self::handleRetrieveArrayCommand($command);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
97
|
$response = self::$handlers[$command->getCommandType()->getValue()]
|
|
103
98
|
->handleCommand($command);
|
|
104
99
|
|
|
105
|
-
if ($command->getCommandType()->equalsByValue(CommandType::PROJECT_RESULT_AS_DTO)) {
|
|
106
|
-
return Command::createArrayResponse($response, $command->getRuntimeName());
|
|
107
|
-
}
|
|
108
|
-
|
|
109
100
|
return self::parseResponse($response, $command->getRuntimeName());
|
|
110
101
|
} catch (Throwable $e) {
|
|
111
102
|
if ($e->getPrevious() !== null) {
|
|
@@ -116,37 +107,6 @@ final class Handler
|
|
|
116
107
|
}
|
|
117
108
|
}
|
|
118
109
|
|
|
119
|
-
private static function handleRetrieveArrayCommand(CommandInterface $command): CommandInterface
|
|
120
|
-
{
|
|
121
|
-
$response = self::$handlers[CommandType::REFERENCE()->getValue()]->handleCommand($command->getPayload()[0]);
|
|
122
|
-
|
|
123
|
-
if ($response instanceof ArrayWrapper) {
|
|
124
|
-
return Command::createArrayResponse(
|
|
125
|
-
$response->getData(),
|
|
126
|
-
$command->getRuntimeName()
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
if ($response instanceof ArrayObject) {
|
|
131
|
-
return Command::createArrayResponse(
|
|
132
|
-
$response->getArrayCopy(),
|
|
133
|
-
$command->getRuntimeName()
|
|
134
|
-
);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
if (is_array($response)) {
|
|
138
|
-
return Command::createArrayResponse(
|
|
139
|
-
$response,
|
|
140
|
-
$command->getRuntimeName()
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
throw new TypeError(sprintf(
|
|
145
|
-
'Expected array, ArrayObject or ArrayWrapper for RETRIEVE_ARRAY, got %s',
|
|
146
|
-
is_object($response) ? get_class($response) : gettype($response)
|
|
147
|
-
));
|
|
148
|
-
}
|
|
149
|
-
|
|
150
110
|
/**
|
|
151
111
|
* @param mixed $response
|
|
152
112
|
*/
|
|
@@ -157,6 +117,8 @@ final class Handler
|
|
|
157
117
|
$response,
|
|
158
118
|
$runtimeName
|
|
159
119
|
);
|
|
120
|
+
} elseif ($response instanceof CommandInterface) {
|
|
121
|
+
$responseCommand = $response;
|
|
160
122
|
} else {
|
|
161
123
|
if (is_array($response)) {
|
|
162
124
|
$response = new ArrayWrapper($response);
|
|
@@ -6,7 +6,6 @@ namespace core\handler;
|
|
|
6
6
|
|
|
7
7
|
use core\delegatecache\DelegatesCache;
|
|
8
8
|
use utils\CommandInterface;
|
|
9
|
-
use utils\exception\HypertubeArgumentsMismatchException;
|
|
10
9
|
|
|
11
10
|
final class InvokeDelegateHandler extends AbstractHandler
|
|
12
11
|
{
|
|
@@ -17,12 +16,7 @@ final class InvokeDelegateHandler extends AbstractHandler
|
|
|
17
16
|
*/
|
|
18
17
|
public function process(CommandInterface $command)
|
|
19
18
|
{
|
|
20
|
-
|
|
21
|
-
throw new HypertubeArgumentsMismatchException(
|
|
22
|
-
self::class,
|
|
23
|
-
self::REQUIRED_ARGUMENTS_COUNT
|
|
24
|
-
);
|
|
25
|
-
}
|
|
19
|
+
$this->validate($command, self::REQUIRED_ARGUMENTS_COUNT, self::class);
|
|
26
20
|
|
|
27
21
|
$guid = (string) $command->getPayload()[0];
|
|
28
22
|
$delegate = DelegatesCache::getInstance()->getDelegate($guid);
|
|
@@ -5,7 +5,6 @@ declare(strict_types=1);
|
|
|
5
5
|
namespace core\handler;
|
|
6
6
|
|
|
7
7
|
use utils\CommandInterface;
|
|
8
|
-
use utils\exception\HypertubeArgumentsMismatchException;
|
|
9
8
|
use ReflectionClass;
|
|
10
9
|
use ReflectionException;
|
|
11
10
|
|
|
@@ -18,9 +17,7 @@ final class InvokeGenericMethodHandler extends AbstractHandler
|
|
|
18
17
|
*/
|
|
19
18
|
public function process(CommandInterface $command)
|
|
20
19
|
{
|
|
21
|
-
|
|
22
|
-
throw new HypertubeArgumentsMismatchException(self::class, self::REQUIRED_ARGUMENTS_COUNT);
|
|
23
|
-
}
|
|
20
|
+
$this->validate($command, self::REQUIRED_ARGUMENTS_COUNT, self::class);
|
|
24
21
|
|
|
25
22
|
$objectOrClass = $command->getPayload()[0];
|
|
26
23
|
$methodToInvoke = $command->getPayload()[1];
|