hypertube-binaries 3.0.2 → 3.0.3
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/NetVersionLatest.runtimeconfig.json +2 -2
- package/Binaries/Native/Linux/{X64/_HypertubeNativeErrorLogger_2026-04-17.txt → ARM64/_HypertubeNativeErrorLogger_2026-05-05.txt} +1 -1
- package/Binaries/Native/Linux/ARM64/libHypertubeActivationService.so +0 -0
- package/Binaries/Native/Linux/ARM64/libHypertubeNetcoreRuntimeNative.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/NetVersionLatest.runtimeconfig.json +2 -2
- package/Binaries/Native/Linux/{ARM64/_HypertubeNativeErrorLogger_2026-04-17.txt → X64/_HypertubeNativeErrorLogger_2026-05-05.txt} +1 -1
- package/Binaries/Native/Linux/X64/libHypertubeActivationService.so +0 -0
- package/Binaries/Native/Linux/X64/libHypertubeNetcoreRuntimeNative.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/NetVersionLatest.runtimeconfig.json +2 -2
- package/Binaries/Native/MacOs/ARM64/_HypertubeNativeErrorLogger_2026-05-05.txt +2 -0
- package/Binaries/Native/MacOs/ARM64/libHypertubeActivationService.dylib +0 -0
- package/Binaries/Native/MacOs/ARM64/libHypertubeNetcoreRuntimeNative.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/NetVersionLatest.runtimeconfig.json +2 -2
- package/Binaries/Native/MacOs/X64/{_HypertubeNativeErrorLogger_2026-04-17.txt → _HypertubeNativeErrorLogger_2026-05-05.txt} +1 -1
- package/Binaries/Native/MacOs/X64/libHypertubeActivationService.dylib +0 -0
- package/Binaries/Native/MacOs/X64/libHypertubeNetcoreRuntimeNative.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/NetVersionLatest.runtimeconfig.json +2 -2
- package/Binaries/Native/Windows/ARM64/Utils.dll +0 -0
- package/Binaries/Native/Windows/ARM64/_HypertubeNativeErrorLogger_2026-05-05.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/NetVersionLatest.runtimeconfig.json +2 -2
- package/Binaries/Native/Windows/X64/Utils.dll +0 -0
- package/Binaries/Native/Windows/X64/_HypertubeNativeErrorLogger_2026-05-05.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/delegatecache/DelegatesCache.php +62 -62
- package/Binaries/Php/hypertube/core/handler/AbstractHandler.php +61 -61
- package/Binaries/Php/hypertube/core/handler/AddEventListenerHandler.php +16 -16
- package/Binaries/Php/hypertube/core/handler/ArrayGetItemHandler.php +57 -57
- package/Binaries/Php/hypertube/core/handler/ArrayGetRankHandler.php +50 -50
- package/Binaries/Php/hypertube/core/handler/ArrayGetSizeHandler.php +59 -59
- package/Binaries/Php/hypertube/core/handler/ArrayHandler.php +26 -26
- package/Binaries/Php/hypertube/core/handler/ArrayReferenceHandler.php +16 -16
- package/Binaries/Php/hypertube/core/handler/ArraySetItemHandler.php +87 -87
- package/Binaries/Php/hypertube/core/handler/AsDtoHandler.php +18 -18
- package/Binaries/Php/hypertube/core/handler/AsKwargsHandler.php +19 -19
- package/Binaries/Php/hypertube/core/handler/AsOutHandler.php +19 -19
- package/Binaries/Php/hypertube/core/handler/AsRefHandler.php +20 -20
- package/Binaries/Php/hypertube/core/handler/CastHandler.php +93 -93
- package/Binaries/Php/hypertube/core/handler/ContextMetadataHandler.php +20 -0
- package/Binaries/Php/hypertube/core/handler/ConvertTypeHandler.php +20 -20
- package/Binaries/Php/hypertube/core/handler/CreateInstanceHandler.php +98 -98
- package/Binaries/Php/hypertube/core/handler/CreateNullHandler.php +16 -16
- package/Binaries/Php/hypertube/core/handler/DestructReferenceHandler.php +29 -29
- package/Binaries/Php/hypertube/core/handler/DtoPropertyHandler.php +18 -18
- package/Binaries/Php/hypertube/core/handler/EnableNamespaceHandler.php +36 -36
- package/Binaries/Php/hypertube/core/handler/EnableTypeHandler.php +33 -33
- package/Binaries/Php/hypertube/core/handler/ExceptionHandler.php +16 -16
- package/Binaries/Php/hypertube/core/handler/GenerateLibHandler.php +16 -16
- package/Binaries/Php/hypertube/core/handler/GetAsyncOperationResultHandler.php +16 -16
- package/Binaries/Php/hypertube/core/handler/GetEnumItemHandler.php +16 -16
- package/Binaries/Php/hypertube/core/handler/GetEnumNameHandler.php +16 -16
- package/Binaries/Php/hypertube/core/handler/GetEnumValueHandler.php +16 -16
- package/Binaries/Php/hypertube/core/handler/GetGlobalFieldHandler.php +16 -16
- package/Binaries/Php/hypertube/core/handler/GetInstanceFieldHandler.php +55 -55
- package/Binaries/Php/hypertube/core/handler/GetInstanceMethodAsDelegateHandler.php +52 -52
- package/Binaries/Php/hypertube/core/handler/GetModuleHandler.php +15 -15
- package/Binaries/Php/hypertube/core/handler/GetRefValueHandler.php +16 -16
- package/Binaries/Php/hypertube/core/handler/GetResultTypeHandler.php +16 -16
- package/Binaries/Php/hypertube/core/handler/GetStaticFieldHandler.php +81 -81
- package/Binaries/Php/hypertube/core/handler/GetStaticMethodAsDelegateHandler.php +109 -109
- package/Binaries/Php/hypertube/core/handler/GetTypeHandler.php +146 -146
- package/Binaries/Php/hypertube/core/handler/Handler.php +176 -175
- package/Binaries/Php/hypertube/core/handler/HeartBeatHandler.php +20 -20
- package/Binaries/Php/hypertube/core/handler/InvokeDelegateHandler.php +27 -27
- package/Binaries/Php/hypertube/core/handler/InvokeGenericMethodHandler.php +47 -47
- package/Binaries/Php/hypertube/core/handler/InvokeGenericStaticMethodHandler.php +111 -111
- package/Binaries/Php/hypertube/core/handler/InvokeGlobalFunctionHandler.php +48 -48
- package/Binaries/Php/hypertube/core/handler/InvokeInstanceMethodHandler.php +78 -78
- package/Binaries/Php/hypertube/core/handler/InvokeStaticMethodHandler.php +95 -95
- package/Binaries/Php/hypertube/core/handler/LoadLibraryHandler.php +360 -360
- package/Binaries/Php/hypertube/core/handler/OptimizeHandler.php +16 -16
- package/Binaries/Php/hypertube/core/handler/PassByValueHandler.php +103 -103
- package/Binaries/Php/hypertube/core/handler/PassDelegateHandler.php +58 -58
- package/Binaries/Php/hypertube/core/handler/PluginWrapperHandler.php +15 -15
- package/Binaries/Php/hypertube/core/handler/ProjectResultAsDtoHandler.php +68 -68
- package/Binaries/Php/hypertube/core/handler/RegisterForUpdateHandler.php +65 -65
- package/Binaries/Php/hypertube/core/handler/ResolveInstanceHandler.php +27 -27
- package/Binaries/Php/hypertube/core/handler/RetrieveArrayHandler.php +48 -48
- package/Binaries/Php/hypertube/core/handler/SetInstanceFieldHandler.php +54 -54
- package/Binaries/Php/hypertube/core/handler/SetStaticFieldHandler.php +56 -56
- package/Binaries/Php/hypertube/core/handler/ValueForUpdateHandler.php +20 -20
- package/Binaries/Php/hypertube/core/handler/ValueHandler.php +18 -18
- package/Binaries/Php/hypertube/core/handler/loadLibrary/ClasspathScanner.php +66 -66
- package/Binaries/Php/hypertube/core/http2Client/Http2Client.php +50 -0
- package/Binaries/Php/hypertube/core/interpreter/Interpreter.php +126 -123
- package/Binaries/Php/hypertube/core/namespacescache/NamespacesCache.php +88 -88
- package/Binaries/Php/hypertube/core/protocol/CommandDeserializer.php +337 -337
- package/Binaries/Php/hypertube/core/protocol/CommandSerializer.php +112 -112
- package/Binaries/Php/hypertube/core/protocol/TypeDeserializer.php +102 -102
- package/Binaries/Php/hypertube/core/protocol/TypeSerializer.php +188 -188
- package/Binaries/Php/hypertube/core/receiver/Receiver.php +45 -45
- package/Binaries/Php/hypertube/core/referencecache/ReferencesCache.php +68 -68
- package/Binaries/Php/hypertube/core/transmitter/Transmitter.php +47 -47
- package/Binaries/Php/hypertube/core/transmitter/TransmitterWrapper.php +181 -181
- package/Binaries/Php/hypertube/core/typescache/TypesCache.php +60 -60
- package/Binaries/Php/hypertube/core/webSocketClient/WebSocketClient.php +626 -620
- package/Binaries/Php/hypertube/utils/ArrayWrapper.php +122 -122
- package/Binaries/Php/hypertube/utils/Command.php +265 -265
- package/Binaries/Php/hypertube/utils/CommandInterface.php +23 -23
- package/Binaries/Php/hypertube/utils/DynamicMethodFactory.php +93 -93
- package/Binaries/Php/hypertube/utils/Enum.php +87 -87
- package/Binaries/Php/hypertube/utils/ExceptionSerializer.php +81 -81
- package/Binaries/Php/hypertube/utils/RuntimeLogger.php +44 -44
- package/Binaries/Php/hypertube/utils/RuntimeName.php +21 -21
- package/Binaries/Php/hypertube/utils/RuntimeNameHandler.php +72 -72
- package/Binaries/Php/hypertube/utils/StringEncodingMode.php +12 -12
- package/Binaries/Php/hypertube/utils/TypesHandler.php +47 -47
- package/Binaries/Php/hypertube/utils/Uri.php +138 -138
- package/Binaries/Php/hypertube/utils/UtilsArray.php +16 -16
- package/Binaries/Php/hypertube/utils/UtilsConst.php +75 -75
- package/Binaries/Php/hypertube/utils/UtilsSimpleType.php +48 -48
- package/Binaries/Php/hypertube/utils/Uuid.php +47 -47
- package/Binaries/Php/hypertube/utils/connectiondata/ConnectionData.php +84 -0
- package/Binaries/Php/hypertube/utils/connectiondata/Http2ConnectionData.php +43 -0
- package/Binaries/Php/hypertube/utils/connectiondata/IConnectionData.php +19 -15
- package/Binaries/Php/hypertube/utils/connectiondata/InMemoryConnectionData.php +25 -35
- package/Binaries/Php/hypertube/utils/connectiondata/TcpConnectionData.php +68 -77
- package/Binaries/Php/hypertube/utils/connectiondata/WsConnectionData.php +43 -43
- package/Binaries/Php/hypertube/utils/error/UnsupportedPayloadItemTypeError.php +19 -19
- package/Binaries/Php/hypertube/utils/exception/BadMethodCallException.php +14 -14
- package/Binaries/Php/hypertube/utils/exception/DelegateNotFoundException.php +14 -14
- package/Binaries/Php/hypertube/utils/exception/ExceptionThrower.php +121 -121
- package/Binaries/Php/hypertube/utils/exception/FieldNotFoundInClassException.php +41 -41
- package/Binaries/Php/hypertube/utils/exception/HypertubeArgumentsMismatchException.php +17 -17
- package/Binaries/Php/hypertube/utils/exception/InvalidUriException.php +14 -14
- package/Binaries/Php/hypertube/utils/exception/SingletonUnserializeException.php +15 -15
- package/Binaries/Php/hypertube/utils/exception/TypeByteNotSupportedException.php +14 -14
- package/Binaries/Php/hypertube/utils/exception/TypeNotSupportedException.php +16 -16
- package/Binaries/Php/hypertube/utils/exception/TypeSerializationNotSupportedException.php +18 -18
- package/Binaries/Php/hypertube/utils/exception/UnsupportedOperationException.php +10 -10
- package/Binaries/Php/hypertube/utils/exception/enum/EnumNameNotFoundException.php +15 -15
- package/Binaries/Php/hypertube/utils/exception/enum/InvalidEnumValueException.php +15 -15
- package/Binaries/Php/hypertube/utils/messagehelper/MessageHelper.php +102 -102
- package/Binaries/Php/hypertube/utils/type/CommandType.php +67 -66
- package/Binaries/Php/hypertube/utils/type/ConnectionType.php +15 -14
- package/Binaries/Php/hypertube/utils/type/ExceptionType.php +45 -45
- package/Binaries/Php/hypertube/utils/type/JType.php +24 -24
- package/Binaries/Php/hypertube/utils/type/SizeType.php +22 -22
- package/Binaries/Python/hypertube/core/handler/ContextMetadataHandler.py +7 -0
- package/Binaries/Python/hypertube/core/handler/Handler.py +2 -0
- package/Binaries/Python/hypertube/core/http2Client/Http2Client.py +332 -0
- package/Binaries/Python/hypertube/core/interpreter/Interpreter.py +4 -1
- package/Binaries/Python/hypertube/core/webSocketClient/WebSocketClient.py +81 -25
- package/Binaries/Python/hypertube/utils/CommandType.py +2 -1
- package/Binaries/Python/hypertube/utils/ConnectionType.py +1 -0
- package/Binaries/Python/hypertube/utils/connectionData/Http2ConnectionData.py +36 -0
- package/Binaries/Python/hypertube/utils/connectionData/IConnectionData.py +38 -0
- package/Binaries/Python/hypertube/utils/connectionData/InMemoryConnectionData.py +4 -12
- package/Binaries/Python/hypertube/utils/connectionData/TcpConnectionData.py +4 -15
- package/Binaries/Python/hypertube/utils/connectionData/WsConnectionData.py +14 -12
- package/Binaries/Python/hypertube/utils/messageHelper/MessageHelper.py +20 -15
- package/Binaries/Ruby/core/handler/context_metadata_handler.rb +11 -0
- package/Binaries/Ruby/core/handler/handler.rb +3 -0
- package/Binaries/Ruby/core/http2_client/http2_client.rb +69 -0
- package/Binaries/Ruby/core/interpreter/interpreter.rb +7 -4
- package/Binaries/Ruby/core/web_socket_client/web_socket_client.rb +41 -25
- package/Binaries/Ruby/utils/command_type.rb +3 -0
- package/Binaries/Ruby/utils/connection_type.rb +1 -0
- package/Binaries/Ruby/utils/http2_connection_data.rb +59 -0
- package/Binaries/Ruby/utils/tcp_connection_data.rb +38 -6
- package/Binaries/Ruby/utils/ws_connection_data.rb +40 -6
- 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/Linux/ARM64/NetVersion31LatestPatch.runtimeconfig.json +0 -10
- package/Binaries/Native/Linux/ARM64/NetVersion60LatestPatch.runtimeconfig.json +0 -10
- package/Binaries/Native/Linux/ARM64/NetVersion70LatestPatch.runtimeconfig.json +0 -10
- package/Binaries/Native/Linux/X64/NetVersion31LatestPatch.runtimeconfig.json +0 -10
- package/Binaries/Native/Linux/X64/NetVersion60LatestPatch.runtimeconfig.json +0 -10
- package/Binaries/Native/Linux/X64/NetVersion70LatestPatch.runtimeconfig.json +0 -10
- package/Binaries/Native/MacOs/ARM64/NetVersion31LatestPatch.runtimeconfig.json +0 -10
- package/Binaries/Native/MacOs/ARM64/NetVersion60LatestPatch.runtimeconfig.json +0 -10
- package/Binaries/Native/MacOs/ARM64/NetVersion70LatestPatch.runtimeconfig.json +0 -10
- package/Binaries/Native/MacOs/ARM64/_HypertubeNativeErrorLogger_2026-04-17.txt +0 -2
- package/Binaries/Native/MacOs/X64/NetVersion31LatestPatch.runtimeconfig.json +0 -10
- package/Binaries/Native/MacOs/X64/NetVersion60LatestPatch.runtimeconfig.json +0 -10
- package/Binaries/Native/MacOs/X64/NetVersion70LatestPatch.runtimeconfig.json +0 -10
- package/Binaries/Native/Windows/ARM64/NetVersion31LatestPatch.runtimeconfig.json +0 -10
- package/Binaries/Native/Windows/ARM64/NetVersion60LatestPatch.runtimeconfig.json +0 -10
- package/Binaries/Native/Windows/ARM64/NetVersion70LatestPatch.runtimeconfig.json +0 -10
- package/Binaries/Native/Windows/ARM64/_HypertubeNativeErrorLogger_2026-04-17.txt +0 -2
- package/Binaries/Native/Windows/X64/NetVersion31LatestPatch.runtimeconfig.json +0 -10
- package/Binaries/Native/Windows/X64/NetVersion60LatestPatch.runtimeconfig.json +0 -10
- package/Binaries/Native/Windows/X64/NetVersion70LatestPatch.runtimeconfig.json +0 -10
- package/Binaries/Native/Windows/X64/_HypertubeNativeErrorLogger_2026-04-17.txt +0 -2
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
|
|
3
|
-
declare(strict_types=1);
|
|
4
|
-
|
|
5
|
-
namespace core\handler;
|
|
6
|
-
|
|
7
|
-
use ArrayAccess;
|
|
8
|
-
use Exception;
|
|
9
|
-
use utils\CommandInterface;
|
|
10
|
-
|
|
11
|
-
final class ArrayGetItemHandler extends AbstractHandler
|
|
12
|
-
{
|
|
13
|
-
/**
|
|
14
|
-
* @return mixed
|
|
15
|
-
* @throws Exception
|
|
16
|
-
*/
|
|
17
|
-
public function process(CommandInterface $command)
|
|
18
|
-
{
|
|
19
|
-
$payload = $command->getPayload();
|
|
20
|
-
if (empty($payload)) {
|
|
21
|
-
throw new Exception('Payload cannot be empty.');
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
if (is_array($payload[0]) || $payload[0] instanceof ArrayAccess) {
|
|
25
|
-
$indexes = array_slice($payload, 1);
|
|
26
|
-
|
|
27
|
-
return $this->getElement($payload[0], $indexes);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
throw new Exception(sprintf('Cannot get element from type: %s', gettype($payload[0])));
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @param mixed $value
|
|
35
|
-
* @return mixed
|
|
36
|
-
* @throws Exception
|
|
37
|
-
*/
|
|
38
|
-
private function getElement($value, array $indexes)
|
|
39
|
-
{
|
|
40
|
-
if (count($indexes) === 1 && is_array($indexes[0])) {
|
|
41
|
-
$indexes = $indexes[0];
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (empty($indexes)) {
|
|
45
|
-
throw new Exception('Index not provided.');
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
foreach ($indexes as $index) {
|
|
49
|
-
if ((is_array($value) || $value instanceof ArrayAccess) && isset($value[$index])) {
|
|
50
|
-
$value = $value[$index];
|
|
51
|
-
} else {
|
|
52
|
-
throw new Exception(sprintf('Invalid index: %s or key not found.', $index));
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return $value;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
declare(strict_types=1);
|
|
4
|
+
|
|
5
|
+
namespace core\handler;
|
|
6
|
+
|
|
7
|
+
use ArrayAccess;
|
|
8
|
+
use Exception;
|
|
9
|
+
use utils\CommandInterface;
|
|
10
|
+
|
|
11
|
+
final class ArrayGetItemHandler extends AbstractHandler
|
|
12
|
+
{
|
|
13
|
+
/**
|
|
14
|
+
* @return mixed
|
|
15
|
+
* @throws Exception
|
|
16
|
+
*/
|
|
17
|
+
public function process(CommandInterface $command)
|
|
18
|
+
{
|
|
19
|
+
$payload = $command->getPayload();
|
|
20
|
+
if (empty($payload)) {
|
|
21
|
+
throw new Exception('Payload cannot be empty.');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (is_array($payload[0]) || $payload[0] instanceof ArrayAccess) {
|
|
25
|
+
$indexes = array_slice($payload, 1);
|
|
26
|
+
|
|
27
|
+
return $this->getElement($payload[0], $indexes);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
throw new Exception(sprintf('Cannot get element from type: %s', gettype($payload[0])));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @param mixed $value
|
|
35
|
+
* @return mixed
|
|
36
|
+
* @throws Exception
|
|
37
|
+
*/
|
|
38
|
+
private function getElement($value, array $indexes)
|
|
39
|
+
{
|
|
40
|
+
if (count($indexes) === 1 && is_array($indexes[0])) {
|
|
41
|
+
$indexes = $indexes[0];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (empty($indexes)) {
|
|
45
|
+
throw new Exception('Index not provided.');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
foreach ($indexes as $index) {
|
|
49
|
+
if ((is_array($value) || $value instanceof ArrayAccess) && isset($value[$index])) {
|
|
50
|
+
$value = $value[$index];
|
|
51
|
+
} else {
|
|
52
|
+
throw new Exception(sprintf('Invalid index: %s or key not found.', $index));
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return $value;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
|
|
3
|
-
declare(strict_types=1);
|
|
4
|
-
|
|
5
|
-
namespace core\handler;
|
|
6
|
-
|
|
7
|
-
use ArrayAccess;
|
|
8
|
-
use utils\ArrayWrapper;
|
|
9
|
-
use utils\CommandInterface;
|
|
10
|
-
|
|
11
|
-
final class ArrayGetRankHandler extends AbstractHandler
|
|
12
|
-
{
|
|
13
|
-
public function process(CommandInterface $command): int
|
|
14
|
-
{
|
|
15
|
-
$payload = $command->getPayload();
|
|
16
|
-
if (empty($payload)) {
|
|
17
|
-
return 0;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return $this->getArrayRank($payload[0]);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* @param mixed $array
|
|
25
|
-
*/
|
|
26
|
-
private function getArrayRank($array): int
|
|
27
|
-
{
|
|
28
|
-
if ($array instanceof ArrayWrapper) {
|
|
29
|
-
return $array->getRank();
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (!is_array($array) && !$array instanceof ArrayAccess) {
|
|
33
|
-
return 0;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
if (empty($array)) {
|
|
37
|
-
return 1;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
$maxRank = 0;
|
|
41
|
-
foreach ($array as $element) {
|
|
42
|
-
$rank = $this->getArrayRank($element);
|
|
43
|
-
if ($rank > $maxRank) {
|
|
44
|
-
$maxRank = $rank;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return 1 + $maxRank;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
declare(strict_types=1);
|
|
4
|
+
|
|
5
|
+
namespace core\handler;
|
|
6
|
+
|
|
7
|
+
use ArrayAccess;
|
|
8
|
+
use utils\ArrayWrapper;
|
|
9
|
+
use utils\CommandInterface;
|
|
10
|
+
|
|
11
|
+
final class ArrayGetRankHandler extends AbstractHandler
|
|
12
|
+
{
|
|
13
|
+
public function process(CommandInterface $command): int
|
|
14
|
+
{
|
|
15
|
+
$payload = $command->getPayload();
|
|
16
|
+
if (empty($payload)) {
|
|
17
|
+
return 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return $this->getArrayRank($payload[0]);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @param mixed $array
|
|
25
|
+
*/
|
|
26
|
+
private function getArrayRank($array): int
|
|
27
|
+
{
|
|
28
|
+
if ($array instanceof ArrayWrapper) {
|
|
29
|
+
return $array->getRank();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (!is_array($array) && !$array instanceof ArrayAccess) {
|
|
33
|
+
return 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (empty($array)) {
|
|
37
|
+
return 1;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
$maxRank = 0;
|
|
41
|
+
foreach ($array as $element) {
|
|
42
|
+
$rank = $this->getArrayRank($element);
|
|
43
|
+
if ($rank > $maxRank) {
|
|
44
|
+
$maxRank = $rank;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return 1 + $maxRank;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
|
|
3
|
-
declare(strict_types=1);
|
|
4
|
-
|
|
5
|
-
namespace core\handler;
|
|
6
|
-
|
|
7
|
-
use Countable;
|
|
8
|
-
use Exception;
|
|
9
|
-
use utils\ArrayWrapper;
|
|
10
|
-
use utils\CommandInterface;
|
|
11
|
-
|
|
12
|
-
final class ArrayGetSizeHandler extends AbstractHandler
|
|
13
|
-
{
|
|
14
|
-
public function process(CommandInterface $command): int
|
|
15
|
-
{
|
|
16
|
-
$payload = $command->getPayload();
|
|
17
|
-
if (empty($payload)) {
|
|
18
|
-
throw new Exception('Payload is empty.');
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
if ($payload[0] instanceof ArrayWrapper) {
|
|
22
|
-
return $this->getArraySize($payload[0]->getData());
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
if (is_array($payload[0])) {
|
|
26
|
-
return $this->getArraySize($payload[0]);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if ($payload[0] instanceof Countable) {
|
|
30
|
-
return count($payload[0]);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (is_object($payload[0]) && method_exists($payload[0], 'size')) {
|
|
34
|
-
return $payload[0]->size();
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (is_object($payload[0])) {
|
|
38
|
-
throw new Exception(sprintf('Cannot get size of object of class %s', get_class($payload[0])));
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
throw new Exception(sprintf('Cannot get size of type %s', gettype($payload[0])));
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
private function getArraySize(array $array): int
|
|
45
|
-
{
|
|
46
|
-
$sizeCount = 1;
|
|
47
|
-
$currentElement = $array;
|
|
48
|
-
|
|
49
|
-
while (is_array($currentElement)) {
|
|
50
|
-
$sizeCount *= count($currentElement);
|
|
51
|
-
if (empty($currentElement)) {
|
|
52
|
-
break;
|
|
53
|
-
}
|
|
54
|
-
$currentElement = $currentElement[0];
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
return $sizeCount;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
declare(strict_types=1);
|
|
4
|
+
|
|
5
|
+
namespace core\handler;
|
|
6
|
+
|
|
7
|
+
use Countable;
|
|
8
|
+
use Exception;
|
|
9
|
+
use utils\ArrayWrapper;
|
|
10
|
+
use utils\CommandInterface;
|
|
11
|
+
|
|
12
|
+
final class ArrayGetSizeHandler extends AbstractHandler
|
|
13
|
+
{
|
|
14
|
+
public function process(CommandInterface $command): int
|
|
15
|
+
{
|
|
16
|
+
$payload = $command->getPayload();
|
|
17
|
+
if (empty($payload)) {
|
|
18
|
+
throw new Exception('Payload is empty.');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if ($payload[0] instanceof ArrayWrapper) {
|
|
22
|
+
return $this->getArraySize($payload[0]->getData());
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (is_array($payload[0])) {
|
|
26
|
+
return $this->getArraySize($payload[0]);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if ($payload[0] instanceof Countable) {
|
|
30
|
+
return count($payload[0]);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (is_object($payload[0]) && method_exists($payload[0], 'size')) {
|
|
34
|
+
return $payload[0]->size();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (is_object($payload[0])) {
|
|
38
|
+
throw new Exception(sprintf('Cannot get size of object of class %s', get_class($payload[0])));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
throw new Exception(sprintf('Cannot get size of type %s', gettype($payload[0])));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
private function getArraySize(array $array): int
|
|
45
|
+
{
|
|
46
|
+
$sizeCount = 1;
|
|
47
|
+
$currentElement = $array;
|
|
48
|
+
|
|
49
|
+
while (is_array($currentElement)) {
|
|
50
|
+
$sizeCount *= count($currentElement);
|
|
51
|
+
if (empty($currentElement)) {
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
$currentElement = $currentElement[0];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return $sizeCount;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
|
|
3
|
-
declare(strict_types=1);
|
|
4
|
-
|
|
5
|
-
namespace core\handler;
|
|
6
|
-
|
|
7
|
-
use utils\CommandInterface;
|
|
8
|
-
|
|
9
|
-
final class ArrayHandler extends AbstractHandler
|
|
10
|
-
{
|
|
11
|
-
public function process(CommandInterface $command): array
|
|
12
|
-
{
|
|
13
|
-
$payload = $command->getPayload();
|
|
14
|
-
|
|
15
|
-
if (empty($payload)) {
|
|
16
|
-
return [];
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
$processedArray = [];
|
|
20
|
-
foreach ($payload as $item) {
|
|
21
|
-
$processedArray[] = $item;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return $processedArray;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
declare(strict_types=1);
|
|
4
|
+
|
|
5
|
+
namespace core\handler;
|
|
6
|
+
|
|
7
|
+
use utils\CommandInterface;
|
|
8
|
+
|
|
9
|
+
final class ArrayHandler extends AbstractHandler
|
|
10
|
+
{
|
|
11
|
+
public function process(CommandInterface $command): array
|
|
12
|
+
{
|
|
13
|
+
$payload = $command->getPayload();
|
|
14
|
+
|
|
15
|
+
if (empty($payload)) {
|
|
16
|
+
return [];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
$processedArray = [];
|
|
20
|
+
foreach ($payload as $item) {
|
|
21
|
+
$processedArray[] = $item;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return $processedArray;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
|
|
3
|
-
declare(strict_types=1);
|
|
4
|
-
|
|
5
|
-
namespace core\handler;
|
|
6
|
-
|
|
7
|
-
use utils\CommandInterface;
|
|
8
|
-
|
|
9
|
-
final class ArrayReferenceHandler extends AbstractHandler
|
|
10
|
-
{
|
|
11
|
-
public function process(CommandInterface $command)
|
|
12
|
-
{
|
|
13
|
-
throw new \Exception(__CLASS__ . ' is not implemented in PHP');
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
declare(strict_types=1);
|
|
4
|
+
|
|
5
|
+
namespace core\handler;
|
|
6
|
+
|
|
7
|
+
use utils\CommandInterface;
|
|
8
|
+
|
|
9
|
+
final class ArrayReferenceHandler extends AbstractHandler
|
|
10
|
+
{
|
|
11
|
+
public function process(CommandInterface $command)
|
|
12
|
+
{
|
|
13
|
+
throw new \Exception(__CLASS__ . ' is not implemented in PHP');
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
|
|
3
|
-
declare(strict_types=1);
|
|
4
|
-
|
|
5
|
-
namespace core\handler;
|
|
6
|
-
|
|
7
|
-
use ArrayAccess;
|
|
8
|
-
use Exception;
|
|
9
|
-
use utils\ArrayWrapper;
|
|
10
|
-
use utils\CommandInterface;
|
|
11
|
-
|
|
12
|
-
final class ArraySetItemHandler extends AbstractHandler
|
|
13
|
-
{
|
|
14
|
-
private const REQUIRED_PARAMETERS_COUNT = 3;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* @return mixed
|
|
18
|
-
*/
|
|
19
|
-
public function process(CommandInterface $command)
|
|
20
|
-
{
|
|
21
|
-
try {
|
|
22
|
-
$this->validate($command, self::REQUIRED_PARAMETERS_COUNT, self::class);
|
|
23
|
-
|
|
24
|
-
$payload = $command->getPayload();
|
|
25
|
-
$data = $payload[0];
|
|
26
|
-
$indexesFromPayload = $payload[1];
|
|
27
|
-
$value = $payload[2];
|
|
28
|
-
|
|
29
|
-
$indexes = is_array($indexesFromPayload) ? $indexesFromPayload : [$indexesFromPayload];
|
|
30
|
-
if (empty($indexes)) {
|
|
31
|
-
throw new Exception('ArraySetItemHandler parameters mismatch!');
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if ($data instanceof ArrayWrapper) {
|
|
35
|
-
$actualData = &$data->getData();
|
|
36
|
-
$this->setArrayValue($actualData, $indexes, $value);
|
|
37
|
-
|
|
38
|
-
return $data;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
if (count($indexes) === 1) {
|
|
42
|
-
if (is_array($data) || $data instanceof ArrayAccess) {
|
|
43
|
-
$data[$indexes[0]] = $value;
|
|
44
|
-
|
|
45
|
-
return $data;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
throw new Exception(sprintf('Cannot set item on type: %s', gettype($data)));
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (!is_array($data)) {
|
|
52
|
-
throw new Exception(sprintf('Cannot set nested item on type: %s', gettype($data)));
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
$this->setArrayValue($data, $indexes, $value);
|
|
56
|
-
|
|
57
|
-
return $data;
|
|
58
|
-
} catch (Exception $exception) {
|
|
59
|
-
$className = get_class($exception);
|
|
60
|
-
throw new $className($exception->getMessage(), (int) $exception->getCode());
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* @param mixed $value
|
|
66
|
-
*/
|
|
67
|
-
private function setArrayValue(array &$data, array $indexes, $value): void
|
|
68
|
-
{
|
|
69
|
-
if (count($indexes) === 1) {
|
|
70
|
-
$data[$indexes[0]] = $value;
|
|
71
|
-
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
$current = &$data;
|
|
76
|
-
$lastIndex = count($indexes) - 1;
|
|
77
|
-
for ($i = 0; $i < $lastIndex; $i++) {
|
|
78
|
-
$index = $indexes[$i];
|
|
79
|
-
if (!isset($current[$index]) || !is_array($current[$index])) {
|
|
80
|
-
throw new Exception(sprintf('Invalid index path at: %s', (string) $index));
|
|
81
|
-
}
|
|
82
|
-
$current = &$current[$index];
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
$current[$indexes[$lastIndex]] = $value;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
declare(strict_types=1);
|
|
4
|
+
|
|
5
|
+
namespace core\handler;
|
|
6
|
+
|
|
7
|
+
use ArrayAccess;
|
|
8
|
+
use Exception;
|
|
9
|
+
use utils\ArrayWrapper;
|
|
10
|
+
use utils\CommandInterface;
|
|
11
|
+
|
|
12
|
+
final class ArraySetItemHandler extends AbstractHandler
|
|
13
|
+
{
|
|
14
|
+
private const REQUIRED_PARAMETERS_COUNT = 3;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @return mixed
|
|
18
|
+
*/
|
|
19
|
+
public function process(CommandInterface $command)
|
|
20
|
+
{
|
|
21
|
+
try {
|
|
22
|
+
$this->validate($command, self::REQUIRED_PARAMETERS_COUNT, self::class);
|
|
23
|
+
|
|
24
|
+
$payload = $command->getPayload();
|
|
25
|
+
$data = $payload[0];
|
|
26
|
+
$indexesFromPayload = $payload[1];
|
|
27
|
+
$value = $payload[2];
|
|
28
|
+
|
|
29
|
+
$indexes = is_array($indexesFromPayload) ? $indexesFromPayload : [$indexesFromPayload];
|
|
30
|
+
if (empty($indexes)) {
|
|
31
|
+
throw new Exception('ArraySetItemHandler parameters mismatch!');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if ($data instanceof ArrayWrapper) {
|
|
35
|
+
$actualData = &$data->getData();
|
|
36
|
+
$this->setArrayValue($actualData, $indexes, $value);
|
|
37
|
+
|
|
38
|
+
return $data;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (count($indexes) === 1) {
|
|
42
|
+
if (is_array($data) || $data instanceof ArrayAccess) {
|
|
43
|
+
$data[$indexes[0]] = $value;
|
|
44
|
+
|
|
45
|
+
return $data;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
throw new Exception(sprintf('Cannot set item on type: %s', gettype($data)));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (!is_array($data)) {
|
|
52
|
+
throw new Exception(sprintf('Cannot set nested item on type: %s', gettype($data)));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
$this->setArrayValue($data, $indexes, $value);
|
|
56
|
+
|
|
57
|
+
return $data;
|
|
58
|
+
} catch (Exception $exception) {
|
|
59
|
+
$className = get_class($exception);
|
|
60
|
+
throw new $className($exception->getMessage(), (int) $exception->getCode());
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @param mixed $value
|
|
66
|
+
*/
|
|
67
|
+
private function setArrayValue(array &$data, array $indexes, $value): void
|
|
68
|
+
{
|
|
69
|
+
if (count($indexes) === 1) {
|
|
70
|
+
$data[$indexes[0]] = $value;
|
|
71
|
+
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
$current = &$data;
|
|
76
|
+
$lastIndex = count($indexes) - 1;
|
|
77
|
+
for ($i = 0; $i < $lastIndex; $i++) {
|
|
78
|
+
$index = $indexes[$i];
|
|
79
|
+
if (!isset($current[$index]) || !is_array($current[$index])) {
|
|
80
|
+
throw new Exception(sprintf('Invalid index path at: %s', (string) $index));
|
|
81
|
+
}
|
|
82
|
+
$current = &$current[$index];
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
$current[$indexes[$lastIndex]] = $value;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
|
|
3
|
-
declare(strict_types=1);
|
|
4
|
-
|
|
5
|
-
namespace core\handler;
|
|
6
|
-
|
|
7
|
-
use utils\CommandInterface;
|
|
8
|
-
|
|
9
|
-
final class AsDtoHandler extends AbstractHandler
|
|
10
|
-
{
|
|
11
|
-
/**
|
|
12
|
-
* @throws \Exception
|
|
13
|
-
*/
|
|
14
|
-
public function process(CommandInterface $command)
|
|
15
|
-
{
|
|
16
|
-
throw new \Exception(__CLASS__ . ' is not implemented in PHP');
|
|
17
|
-
}
|
|
18
|
-
}
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
declare(strict_types=1);
|
|
4
|
+
|
|
5
|
+
namespace core\handler;
|
|
6
|
+
|
|
7
|
+
use utils\CommandInterface;
|
|
8
|
+
|
|
9
|
+
final class AsDtoHandler extends AbstractHandler
|
|
10
|
+
{
|
|
11
|
+
/**
|
|
12
|
+
* @throws \Exception
|
|
13
|
+
*/
|
|
14
|
+
public function process(CommandInterface $command)
|
|
15
|
+
{
|
|
16
|
+
throw new \Exception(__CLASS__ . ' is not implemented in PHP');
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
|
|
3
|
-
declare(strict_types=1);
|
|
4
|
-
|
|
5
|
-
namespace core\handler;
|
|
6
|
-
|
|
7
|
-
use utils\CommandInterface;
|
|
8
|
-
|
|
9
|
-
final class AsKwargsHandler extends AbstractHandler
|
|
10
|
-
{
|
|
11
|
-
/**
|
|
12
|
-
* @throws \Exception
|
|
13
|
-
*/
|
|
14
|
-
public function process(CommandInterface $command)
|
|
15
|
-
{
|
|
16
|
-
throw new \Exception(__CLASS__ . ' is not implemented in PHP');
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
declare(strict_types=1);
|
|
4
|
+
|
|
5
|
+
namespace core\handler;
|
|
6
|
+
|
|
7
|
+
use utils\CommandInterface;
|
|
8
|
+
|
|
9
|
+
final class AsKwargsHandler extends AbstractHandler
|
|
10
|
+
{
|
|
11
|
+
/**
|
|
12
|
+
* @throws \Exception
|
|
13
|
+
*/
|
|
14
|
+
public function process(CommandInterface $command)
|
|
15
|
+
{
|
|
16
|
+
throw new \Exception(__CLASS__ . ' is not implemented in PHP');
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|