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.
Files changed (231) hide show
  1. package/Binaries/Clr/Hypertube.Clr.Utils.dll +0 -0
  2. package/Binaries/Clr/HypertubeClrRuntime.dll +0 -0
  3. package/Binaries/Jvm/HypertubeJvmRuntime.jar +0 -0
  4. package/Binaries/Native/Linux/ARM64/NetVersionLatest.runtimeconfig.json +2 -2
  5. package/Binaries/Native/Linux/{X64/_HypertubeNativeErrorLogger_2026-04-17.txt → ARM64/_HypertubeNativeErrorLogger_2026-05-05.txt} +1 -1
  6. package/Binaries/Native/Linux/ARM64/libHypertubeActivationService.so +0 -0
  7. package/Binaries/Native/Linux/ARM64/libHypertubeNetcoreRuntimeNative.so +0 -0
  8. package/Binaries/Native/Linux/ARM64/libUtils.so +0 -0
  9. package/Binaries/Native/Linux/ARM64/version.txt +1 -1
  10. package/Binaries/Native/Linux/X64/NetVersionLatest.runtimeconfig.json +2 -2
  11. package/Binaries/Native/Linux/{ARM64/_HypertubeNativeErrorLogger_2026-04-17.txt → X64/_HypertubeNativeErrorLogger_2026-05-05.txt} +1 -1
  12. package/Binaries/Native/Linux/X64/libHypertubeActivationService.so +0 -0
  13. package/Binaries/Native/Linux/X64/libHypertubeNetcoreRuntimeNative.so +0 -0
  14. package/Binaries/Native/Linux/X64/libHypertubeNodejs2218RuntimeNative.so +0 -0
  15. package/Binaries/Native/Linux/X64/libUtils.so +0 -0
  16. package/Binaries/Native/Linux/X64/version.txt +1 -1
  17. package/Binaries/Native/MacOs/ARM64/NetVersionLatest.runtimeconfig.json +2 -2
  18. package/Binaries/Native/MacOs/ARM64/_HypertubeNativeErrorLogger_2026-05-05.txt +2 -0
  19. package/Binaries/Native/MacOs/ARM64/libHypertubeActivationService.dylib +0 -0
  20. package/Binaries/Native/MacOs/ARM64/libHypertubeNetcoreRuntimeNative.dylib +0 -0
  21. package/Binaries/Native/MacOs/ARM64/libHypertubeNodejs2218RuntimeNative.dylib +0 -0
  22. package/Binaries/Native/MacOs/ARM64/libUtils.dylib +0 -0
  23. package/Binaries/Native/MacOs/ARM64/version.txt +1 -1
  24. package/Binaries/Native/MacOs/X64/NetVersionLatest.runtimeconfig.json +2 -2
  25. package/Binaries/Native/MacOs/X64/{_HypertubeNativeErrorLogger_2026-04-17.txt → _HypertubeNativeErrorLogger_2026-05-05.txt} +1 -1
  26. package/Binaries/Native/MacOs/X64/libHypertubeActivationService.dylib +0 -0
  27. package/Binaries/Native/MacOs/X64/libHypertubeNetcoreRuntimeNative.dylib +0 -0
  28. package/Binaries/Native/MacOs/X64/libHypertubeNodejs2218RuntimeNative.dylib +0 -0
  29. package/Binaries/Native/MacOs/X64/libUtils.dylib +0 -0
  30. package/Binaries/Native/MacOs/X64/version.txt +1 -1
  31. package/Binaries/Native/Windows/ARM64/Configs.dll +0 -0
  32. package/Binaries/Native/Windows/ARM64/HypertubeActivationService.dll +0 -0
  33. package/Binaries/Native/Windows/ARM64/HypertubeCppRuntimeNative.dll +0 -0
  34. package/Binaries/Native/Windows/ARM64/HypertubeGoRuntimeNative.dll +0 -0
  35. package/Binaries/Native/Windows/ARM64/HypertubeJvmRuntimeNative.dll +0 -0
  36. package/Binaries/Native/Windows/ARM64/HypertubeNetcoreRuntimeNative.dll +0 -0
  37. package/Binaries/Native/Windows/ARM64/HypertubePhpRuntimeNative.dll +0 -0
  38. package/Binaries/Native/Windows/ARM64/HypertubePythonRuntimeNative.dll +0 -0
  39. package/Binaries/Native/Windows/ARM64/HypertubeRubyRuntimeNative.dll +0 -0
  40. package/Binaries/Native/Windows/ARM64/HypertubeTcpClient.dll +0 -0
  41. package/Binaries/Native/Windows/ARM64/HypertubeTcpTlsClient.dll +0 -0
  42. package/Binaries/Native/Windows/ARM64/NetVersionLatest.runtimeconfig.json +2 -2
  43. package/Binaries/Native/Windows/ARM64/Utils.dll +0 -0
  44. package/Binaries/Native/Windows/ARM64/_HypertubeNativeErrorLogger_2026-05-05.txt +2 -0
  45. package/Binaries/Native/Windows/ARM64/version.txt +0 -0
  46. package/Binaries/Native/Windows/X64/Configs.dll +0 -0
  47. package/Binaries/Native/Windows/X64/HypertubeActivationService.dll +0 -0
  48. package/Binaries/Native/Windows/X64/HypertubeClrRuntimeNative.dll +0 -0
  49. package/Binaries/Native/Windows/X64/HypertubeCppRuntimeNative.dll +0 -0
  50. package/Binaries/Native/Windows/X64/HypertubeGoRuntimeNative.dll +0 -0
  51. package/Binaries/Native/Windows/X64/HypertubeJvmRuntimeNative.dll +0 -0
  52. package/Binaries/Native/Windows/X64/HypertubeNetcoreRuntimeNative.dll +0 -0
  53. package/Binaries/Native/Windows/X64/HypertubeNodejs2218RuntimeNative.dll +0 -0
  54. package/Binaries/Native/Windows/X64/HypertubeNodejsRuntimeNative.dll +0 -0
  55. package/Binaries/Native/Windows/X64/HypertubePhp848RuntimeNative.dll +0 -0
  56. package/Binaries/Native/Windows/X64/HypertubePhpRuntimeNative.dll +0 -0
  57. package/Binaries/Native/Windows/X64/HypertubePythonRuntimeNative.dll +0 -0
  58. package/Binaries/Native/Windows/X64/HypertubeRubyRuntimeNative.dll +0 -0
  59. package/Binaries/Native/Windows/X64/HypertubeTcpClient.dll +0 -0
  60. package/Binaries/Native/Windows/X64/HypertubeTcpTlsClient.dll +0 -0
  61. package/Binaries/Native/Windows/X64/NetVersionLatest.runtimeconfig.json +2 -2
  62. package/Binaries/Native/Windows/X64/Utils.dll +0 -0
  63. package/Binaries/Native/Windows/X64/_HypertubeNativeErrorLogger_2026-05-05.txt +2 -0
  64. package/Binaries/Native/Windows/X64/version.txt +1 -1
  65. package/Binaries/Netcore/Hypertube.Netcore.Core.dll +0 -0
  66. package/Binaries/Netcore/Hypertube.Netcore.Plugins.dll +0 -0
  67. package/Binaries/Netcore/Hypertube.Netcore.Utils.dll +0 -0
  68. package/Binaries/Php/hypertube/core/delegatecache/DelegatesCache.php +62 -62
  69. package/Binaries/Php/hypertube/core/handler/AbstractHandler.php +61 -61
  70. package/Binaries/Php/hypertube/core/handler/AddEventListenerHandler.php +16 -16
  71. package/Binaries/Php/hypertube/core/handler/ArrayGetItemHandler.php +57 -57
  72. package/Binaries/Php/hypertube/core/handler/ArrayGetRankHandler.php +50 -50
  73. package/Binaries/Php/hypertube/core/handler/ArrayGetSizeHandler.php +59 -59
  74. package/Binaries/Php/hypertube/core/handler/ArrayHandler.php +26 -26
  75. package/Binaries/Php/hypertube/core/handler/ArrayReferenceHandler.php +16 -16
  76. package/Binaries/Php/hypertube/core/handler/ArraySetItemHandler.php +87 -87
  77. package/Binaries/Php/hypertube/core/handler/AsDtoHandler.php +18 -18
  78. package/Binaries/Php/hypertube/core/handler/AsKwargsHandler.php +19 -19
  79. package/Binaries/Php/hypertube/core/handler/AsOutHandler.php +19 -19
  80. package/Binaries/Php/hypertube/core/handler/AsRefHandler.php +20 -20
  81. package/Binaries/Php/hypertube/core/handler/CastHandler.php +93 -93
  82. package/Binaries/Php/hypertube/core/handler/ContextMetadataHandler.php +20 -0
  83. package/Binaries/Php/hypertube/core/handler/ConvertTypeHandler.php +20 -20
  84. package/Binaries/Php/hypertube/core/handler/CreateInstanceHandler.php +98 -98
  85. package/Binaries/Php/hypertube/core/handler/CreateNullHandler.php +16 -16
  86. package/Binaries/Php/hypertube/core/handler/DestructReferenceHandler.php +29 -29
  87. package/Binaries/Php/hypertube/core/handler/DtoPropertyHandler.php +18 -18
  88. package/Binaries/Php/hypertube/core/handler/EnableNamespaceHandler.php +36 -36
  89. package/Binaries/Php/hypertube/core/handler/EnableTypeHandler.php +33 -33
  90. package/Binaries/Php/hypertube/core/handler/ExceptionHandler.php +16 -16
  91. package/Binaries/Php/hypertube/core/handler/GenerateLibHandler.php +16 -16
  92. package/Binaries/Php/hypertube/core/handler/GetAsyncOperationResultHandler.php +16 -16
  93. package/Binaries/Php/hypertube/core/handler/GetEnumItemHandler.php +16 -16
  94. package/Binaries/Php/hypertube/core/handler/GetEnumNameHandler.php +16 -16
  95. package/Binaries/Php/hypertube/core/handler/GetEnumValueHandler.php +16 -16
  96. package/Binaries/Php/hypertube/core/handler/GetGlobalFieldHandler.php +16 -16
  97. package/Binaries/Php/hypertube/core/handler/GetInstanceFieldHandler.php +55 -55
  98. package/Binaries/Php/hypertube/core/handler/GetInstanceMethodAsDelegateHandler.php +52 -52
  99. package/Binaries/Php/hypertube/core/handler/GetModuleHandler.php +15 -15
  100. package/Binaries/Php/hypertube/core/handler/GetRefValueHandler.php +16 -16
  101. package/Binaries/Php/hypertube/core/handler/GetResultTypeHandler.php +16 -16
  102. package/Binaries/Php/hypertube/core/handler/GetStaticFieldHandler.php +81 -81
  103. package/Binaries/Php/hypertube/core/handler/GetStaticMethodAsDelegateHandler.php +109 -109
  104. package/Binaries/Php/hypertube/core/handler/GetTypeHandler.php +146 -146
  105. package/Binaries/Php/hypertube/core/handler/Handler.php +176 -175
  106. package/Binaries/Php/hypertube/core/handler/HeartBeatHandler.php +20 -20
  107. package/Binaries/Php/hypertube/core/handler/InvokeDelegateHandler.php +27 -27
  108. package/Binaries/Php/hypertube/core/handler/InvokeGenericMethodHandler.php +47 -47
  109. package/Binaries/Php/hypertube/core/handler/InvokeGenericStaticMethodHandler.php +111 -111
  110. package/Binaries/Php/hypertube/core/handler/InvokeGlobalFunctionHandler.php +48 -48
  111. package/Binaries/Php/hypertube/core/handler/InvokeInstanceMethodHandler.php +78 -78
  112. package/Binaries/Php/hypertube/core/handler/InvokeStaticMethodHandler.php +95 -95
  113. package/Binaries/Php/hypertube/core/handler/LoadLibraryHandler.php +360 -360
  114. package/Binaries/Php/hypertube/core/handler/OptimizeHandler.php +16 -16
  115. package/Binaries/Php/hypertube/core/handler/PassByValueHandler.php +103 -103
  116. package/Binaries/Php/hypertube/core/handler/PassDelegateHandler.php +58 -58
  117. package/Binaries/Php/hypertube/core/handler/PluginWrapperHandler.php +15 -15
  118. package/Binaries/Php/hypertube/core/handler/ProjectResultAsDtoHandler.php +68 -68
  119. package/Binaries/Php/hypertube/core/handler/RegisterForUpdateHandler.php +65 -65
  120. package/Binaries/Php/hypertube/core/handler/ResolveInstanceHandler.php +27 -27
  121. package/Binaries/Php/hypertube/core/handler/RetrieveArrayHandler.php +48 -48
  122. package/Binaries/Php/hypertube/core/handler/SetInstanceFieldHandler.php +54 -54
  123. package/Binaries/Php/hypertube/core/handler/SetStaticFieldHandler.php +56 -56
  124. package/Binaries/Php/hypertube/core/handler/ValueForUpdateHandler.php +20 -20
  125. package/Binaries/Php/hypertube/core/handler/ValueHandler.php +18 -18
  126. package/Binaries/Php/hypertube/core/handler/loadLibrary/ClasspathScanner.php +66 -66
  127. package/Binaries/Php/hypertube/core/http2Client/Http2Client.php +50 -0
  128. package/Binaries/Php/hypertube/core/interpreter/Interpreter.php +126 -123
  129. package/Binaries/Php/hypertube/core/namespacescache/NamespacesCache.php +88 -88
  130. package/Binaries/Php/hypertube/core/protocol/CommandDeserializer.php +337 -337
  131. package/Binaries/Php/hypertube/core/protocol/CommandSerializer.php +112 -112
  132. package/Binaries/Php/hypertube/core/protocol/TypeDeserializer.php +102 -102
  133. package/Binaries/Php/hypertube/core/protocol/TypeSerializer.php +188 -188
  134. package/Binaries/Php/hypertube/core/receiver/Receiver.php +45 -45
  135. package/Binaries/Php/hypertube/core/referencecache/ReferencesCache.php +68 -68
  136. package/Binaries/Php/hypertube/core/transmitter/Transmitter.php +47 -47
  137. package/Binaries/Php/hypertube/core/transmitter/TransmitterWrapper.php +181 -181
  138. package/Binaries/Php/hypertube/core/typescache/TypesCache.php +60 -60
  139. package/Binaries/Php/hypertube/core/webSocketClient/WebSocketClient.php +626 -620
  140. package/Binaries/Php/hypertube/utils/ArrayWrapper.php +122 -122
  141. package/Binaries/Php/hypertube/utils/Command.php +265 -265
  142. package/Binaries/Php/hypertube/utils/CommandInterface.php +23 -23
  143. package/Binaries/Php/hypertube/utils/DynamicMethodFactory.php +93 -93
  144. package/Binaries/Php/hypertube/utils/Enum.php +87 -87
  145. package/Binaries/Php/hypertube/utils/ExceptionSerializer.php +81 -81
  146. package/Binaries/Php/hypertube/utils/RuntimeLogger.php +44 -44
  147. package/Binaries/Php/hypertube/utils/RuntimeName.php +21 -21
  148. package/Binaries/Php/hypertube/utils/RuntimeNameHandler.php +72 -72
  149. package/Binaries/Php/hypertube/utils/StringEncodingMode.php +12 -12
  150. package/Binaries/Php/hypertube/utils/TypesHandler.php +47 -47
  151. package/Binaries/Php/hypertube/utils/Uri.php +138 -138
  152. package/Binaries/Php/hypertube/utils/UtilsArray.php +16 -16
  153. package/Binaries/Php/hypertube/utils/UtilsConst.php +75 -75
  154. package/Binaries/Php/hypertube/utils/UtilsSimpleType.php +48 -48
  155. package/Binaries/Php/hypertube/utils/Uuid.php +47 -47
  156. package/Binaries/Php/hypertube/utils/connectiondata/ConnectionData.php +84 -0
  157. package/Binaries/Php/hypertube/utils/connectiondata/Http2ConnectionData.php +43 -0
  158. package/Binaries/Php/hypertube/utils/connectiondata/IConnectionData.php +19 -15
  159. package/Binaries/Php/hypertube/utils/connectiondata/InMemoryConnectionData.php +25 -35
  160. package/Binaries/Php/hypertube/utils/connectiondata/TcpConnectionData.php +68 -77
  161. package/Binaries/Php/hypertube/utils/connectiondata/WsConnectionData.php +43 -43
  162. package/Binaries/Php/hypertube/utils/error/UnsupportedPayloadItemTypeError.php +19 -19
  163. package/Binaries/Php/hypertube/utils/exception/BadMethodCallException.php +14 -14
  164. package/Binaries/Php/hypertube/utils/exception/DelegateNotFoundException.php +14 -14
  165. package/Binaries/Php/hypertube/utils/exception/ExceptionThrower.php +121 -121
  166. package/Binaries/Php/hypertube/utils/exception/FieldNotFoundInClassException.php +41 -41
  167. package/Binaries/Php/hypertube/utils/exception/HypertubeArgumentsMismatchException.php +17 -17
  168. package/Binaries/Php/hypertube/utils/exception/InvalidUriException.php +14 -14
  169. package/Binaries/Php/hypertube/utils/exception/SingletonUnserializeException.php +15 -15
  170. package/Binaries/Php/hypertube/utils/exception/TypeByteNotSupportedException.php +14 -14
  171. package/Binaries/Php/hypertube/utils/exception/TypeNotSupportedException.php +16 -16
  172. package/Binaries/Php/hypertube/utils/exception/TypeSerializationNotSupportedException.php +18 -18
  173. package/Binaries/Php/hypertube/utils/exception/UnsupportedOperationException.php +10 -10
  174. package/Binaries/Php/hypertube/utils/exception/enum/EnumNameNotFoundException.php +15 -15
  175. package/Binaries/Php/hypertube/utils/exception/enum/InvalidEnumValueException.php +15 -15
  176. package/Binaries/Php/hypertube/utils/messagehelper/MessageHelper.php +102 -102
  177. package/Binaries/Php/hypertube/utils/type/CommandType.php +67 -66
  178. package/Binaries/Php/hypertube/utils/type/ConnectionType.php +15 -14
  179. package/Binaries/Php/hypertube/utils/type/ExceptionType.php +45 -45
  180. package/Binaries/Php/hypertube/utils/type/JType.php +24 -24
  181. package/Binaries/Php/hypertube/utils/type/SizeType.php +22 -22
  182. package/Binaries/Python/hypertube/core/handler/ContextMetadataHandler.py +7 -0
  183. package/Binaries/Python/hypertube/core/handler/Handler.py +2 -0
  184. package/Binaries/Python/hypertube/core/http2Client/Http2Client.py +332 -0
  185. package/Binaries/Python/hypertube/core/interpreter/Interpreter.py +4 -1
  186. package/Binaries/Python/hypertube/core/webSocketClient/WebSocketClient.py +81 -25
  187. package/Binaries/Python/hypertube/utils/CommandType.py +2 -1
  188. package/Binaries/Python/hypertube/utils/ConnectionType.py +1 -0
  189. package/Binaries/Python/hypertube/utils/connectionData/Http2ConnectionData.py +36 -0
  190. package/Binaries/Python/hypertube/utils/connectionData/IConnectionData.py +38 -0
  191. package/Binaries/Python/hypertube/utils/connectionData/InMemoryConnectionData.py +4 -12
  192. package/Binaries/Python/hypertube/utils/connectionData/TcpConnectionData.py +4 -15
  193. package/Binaries/Python/hypertube/utils/connectionData/WsConnectionData.py +14 -12
  194. package/Binaries/Python/hypertube/utils/messageHelper/MessageHelper.py +20 -15
  195. package/Binaries/Ruby/core/handler/context_metadata_handler.rb +11 -0
  196. package/Binaries/Ruby/core/handler/handler.rb +3 -0
  197. package/Binaries/Ruby/core/http2_client/http2_client.rb +69 -0
  198. package/Binaries/Ruby/core/interpreter/interpreter.rb +7 -4
  199. package/Binaries/Ruby/core/web_socket_client/web_socket_client.rb +41 -25
  200. package/Binaries/Ruby/utils/command_type.rb +3 -0
  201. package/Binaries/Ruby/utils/connection_type.rb +1 -0
  202. package/Binaries/Ruby/utils/http2_connection_data.rb +59 -0
  203. package/Binaries/Ruby/utils/tcp_connection_data.rb +38 -6
  204. package/Binaries/Ruby/utils/ws_connection_data.rb +40 -6
  205. package/Binaries/version.txt +1 -1
  206. package/package.json +1 -1
  207. package/prebuilds/prebuilds-darwin-arm64/HypertubeNodejsRuntimeAddon.node +0 -0
  208. package/prebuilds/prebuilds-darwin-x64/HypertubeNodejsRuntimeAddon.node +0 -0
  209. package/prebuilds/prebuilds-win32-arm64/HypertubeNodejsRuntimeAddon.node +0 -0
  210. package/prebuilds/prebuilds-win32-x64/HypertubeNodejsRuntimeAddon.node +0 -0
  211. package/Binaries/Native/Linux/ARM64/NetVersion31LatestPatch.runtimeconfig.json +0 -10
  212. package/Binaries/Native/Linux/ARM64/NetVersion60LatestPatch.runtimeconfig.json +0 -10
  213. package/Binaries/Native/Linux/ARM64/NetVersion70LatestPatch.runtimeconfig.json +0 -10
  214. package/Binaries/Native/Linux/X64/NetVersion31LatestPatch.runtimeconfig.json +0 -10
  215. package/Binaries/Native/Linux/X64/NetVersion60LatestPatch.runtimeconfig.json +0 -10
  216. package/Binaries/Native/Linux/X64/NetVersion70LatestPatch.runtimeconfig.json +0 -10
  217. package/Binaries/Native/MacOs/ARM64/NetVersion31LatestPatch.runtimeconfig.json +0 -10
  218. package/Binaries/Native/MacOs/ARM64/NetVersion60LatestPatch.runtimeconfig.json +0 -10
  219. package/Binaries/Native/MacOs/ARM64/NetVersion70LatestPatch.runtimeconfig.json +0 -10
  220. package/Binaries/Native/MacOs/ARM64/_HypertubeNativeErrorLogger_2026-04-17.txt +0 -2
  221. package/Binaries/Native/MacOs/X64/NetVersion31LatestPatch.runtimeconfig.json +0 -10
  222. package/Binaries/Native/MacOs/X64/NetVersion60LatestPatch.runtimeconfig.json +0 -10
  223. package/Binaries/Native/MacOs/X64/NetVersion70LatestPatch.runtimeconfig.json +0 -10
  224. package/Binaries/Native/Windows/ARM64/NetVersion31LatestPatch.runtimeconfig.json +0 -10
  225. package/Binaries/Native/Windows/ARM64/NetVersion60LatestPatch.runtimeconfig.json +0 -10
  226. package/Binaries/Native/Windows/ARM64/NetVersion70LatestPatch.runtimeconfig.json +0 -10
  227. package/Binaries/Native/Windows/ARM64/_HypertubeNativeErrorLogger_2026-04-17.txt +0 -2
  228. package/Binaries/Native/Windows/X64/NetVersion31LatestPatch.runtimeconfig.json +0 -10
  229. package/Binaries/Native/Windows/X64/NetVersion60LatestPatch.runtimeconfig.json +0 -10
  230. package/Binaries/Native/Windows/X64/NetVersion70LatestPatch.runtimeconfig.json +0 -10
  231. package/Binaries/Native/Windows/X64/_HypertubeNativeErrorLogger_2026-04-17.txt +0 -2
@@ -1,36 +1,36 @@
1
- <?php
2
-
3
- declare(strict_types=1);
4
-
5
- namespace core\handler;
6
-
7
- use core\namespacescache\NamespacesCache;
8
- use utils\CommandInterface;
9
-
10
- final class EnableNamespaceHandler extends AbstractHandler
11
- {
12
- private const REQUIRED_ARGUMENTS_COUNT = 1;
13
-
14
- public function process(CommandInterface $command): int
15
- {
16
- $this->validate($command, self::REQUIRED_ARGUMENTS_COUNT, self::class);
17
-
18
- $namespacesCache = NamespacesCache::getInstance();
19
-
20
- foreach ($command->getPayload() as $payload) {
21
- if (is_string($payload)) {
22
- $namespacesCache->cacheNamespace($payload);
23
- }
24
-
25
- if (is_array($payload)) {
26
- foreach ($payload as $namespaceToEnable) {
27
- if (is_string($namespaceToEnable)) {
28
- $namespacesCache->cacheNamespace($namespaceToEnable);
29
- }
30
- }
31
- }
32
- }
33
-
34
- return 0;
35
- }
36
- }
1
+ <?php
2
+
3
+ declare(strict_types=1);
4
+
5
+ namespace core\handler;
6
+
7
+ use core\namespacescache\NamespacesCache;
8
+ use utils\CommandInterface;
9
+
10
+ final class EnableNamespaceHandler extends AbstractHandler
11
+ {
12
+ private const REQUIRED_ARGUMENTS_COUNT = 1;
13
+
14
+ public function process(CommandInterface $command): int
15
+ {
16
+ $this->validate($command, self::REQUIRED_ARGUMENTS_COUNT, self::class);
17
+
18
+ $namespacesCache = NamespacesCache::getInstance();
19
+
20
+ foreach ($command->getPayload() as $payload) {
21
+ if (is_string($payload)) {
22
+ $namespacesCache->cacheNamespace($payload);
23
+ }
24
+
25
+ if (is_array($payload)) {
26
+ foreach ($payload as $namespaceToEnable) {
27
+ if (is_string($namespaceToEnable)) {
28
+ $namespacesCache->cacheNamespace($namespaceToEnable);
29
+ }
30
+ }
31
+ }
32
+ }
33
+
34
+ return 0;
35
+ }
36
+ }
@@ -1,33 +1,33 @@
1
- <?php
2
-
3
- declare(strict_types=1);
4
-
5
- namespace core\handler;
6
-
7
- use core\typescache\TypesCache;
8
- use utils\CommandInterface;
9
-
10
- final class EnableTypeHandler extends AbstractHandler
11
- {
12
- private const REQUIRED_ARGUMENTS_COUNT = 1;
13
-
14
- public function process(CommandInterface $command): int
15
- {
16
- $this->validate($command, self::REQUIRED_ARGUMENTS_COUNT, self::class);
17
-
18
- $typesCache = TypesCache::getInstance();
19
- foreach ($command->getPayload() as $payload) {
20
- if (is_string($payload)) {
21
- $typesCache->cacheType($payload);
22
- }
23
-
24
- if (is_array($payload)) {
25
- foreach ($payload as $namespaceToEnable) {
26
- $typesCache->cacheType($namespaceToEnable);
27
- }
28
- }
29
- }
30
-
31
- return 0;
32
- }
33
- }
1
+ <?php
2
+
3
+ declare(strict_types=1);
4
+
5
+ namespace core\handler;
6
+
7
+ use core\typescache\TypesCache;
8
+ use utils\CommandInterface;
9
+
10
+ final class EnableTypeHandler extends AbstractHandler
11
+ {
12
+ private const REQUIRED_ARGUMENTS_COUNT = 1;
13
+
14
+ public function process(CommandInterface $command): int
15
+ {
16
+ $this->validate($command, self::REQUIRED_ARGUMENTS_COUNT, self::class);
17
+
18
+ $typesCache = TypesCache::getInstance();
19
+ foreach ($command->getPayload() as $payload) {
20
+ if (is_string($payload)) {
21
+ $typesCache->cacheType($payload);
22
+ }
23
+
24
+ if (is_array($payload)) {
25
+ foreach ($payload as $namespaceToEnable) {
26
+ $typesCache->cacheType($namespaceToEnable);
27
+ }
28
+ }
29
+ }
30
+
31
+ return 0;
32
+ }
33
+ }
@@ -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 ExceptionHandler 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 ExceptionHandler extends AbstractHandler
10
+ {
11
+ public function process(CommandInterface $command)
12
+ {
13
+ throw new \Exception(__CLASS__ . ' is not implemented in PHP');
14
+ }
15
+ }
16
+
@@ -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 GenerateLibHandler 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 GenerateLibHandler extends AbstractHandler
10
+ {
11
+ public function process(CommandInterface $command)
12
+ {
13
+ throw new \Exception(__CLASS__ . ' is not implemented in PHP');
14
+ }
15
+ }
16
+
@@ -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 GetAsyncOperationResultHandler 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 GetAsyncOperationResultHandler extends AbstractHandler
10
+ {
11
+ public function process(CommandInterface $command)
12
+ {
13
+ throw new \Exception(__CLASS__ . ' is not implemented in PHP');
14
+ }
15
+ }
16
+
@@ -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 GetEnumItemHandler 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 GetEnumItemHandler extends AbstractHandler
10
+ {
11
+ public function process(CommandInterface $command)
12
+ {
13
+ throw new \Exception(__CLASS__ . ' is not implemented in PHP');
14
+ }
15
+ }
16
+
@@ -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 GetEnumNameHandler 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 GetEnumNameHandler extends AbstractHandler
10
+ {
11
+ public function process(CommandInterface $command)
12
+ {
13
+ throw new \Exception(__CLASS__ . ' is not implemented in PHP');
14
+ }
15
+ }
16
+
@@ -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 GetEnumValueHandler 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 GetEnumValueHandler extends AbstractHandler
10
+ {
11
+ public function process(CommandInterface $command)
12
+ {
13
+ throw new \Exception(__CLASS__ . ' is not implemented in PHP');
14
+ }
15
+ }
16
+
@@ -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 GetGlobalFieldHandler 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 GetGlobalFieldHandler extends AbstractHandler
10
+ {
11
+ public function process(CommandInterface $command)
12
+ {
13
+ throw new \Exception(__CLASS__ . ' is not implemented in PHP');
14
+ }
15
+ }
16
+
@@ -1,55 +1,55 @@
1
- <?php
2
-
3
- declare(strict_types=1);
4
-
5
- namespace core\handler;
6
-
7
- use ReflectionClass;
8
- use ReflectionException;
9
- use Exception;
10
- use SebastianBergmann\CodeCoverage\Report\PHP;
11
- use utils\CommandInterface;
12
-
13
- final class GetInstanceFieldHandler extends AbstractHandler
14
- {
15
- private const REQUIRED_ARGUMENTS_COUNT = 2;
16
-
17
- /**
18
- * @return mixed
19
- */
20
- public function process(CommandInterface $command)
21
- {
22
- $this->validate($command, self::REQUIRED_ARGUMENTS_COUNT, self::class);
23
-
24
- $objectClass = $command->getPayload()[0];
25
- $fieldString = (string)$command->getPayload()[1];
26
-
27
- try {
28
- $reflection = new ReflectionClass($objectClass);
29
- if (!$reflection->hasProperty($fieldString)) {
30
- throw new ReflectionException(sprintf('Property %s not found', $fieldString));
31
- }
32
-
33
- $property = $reflection->getProperty($fieldString);
34
- $property->setAccessible(true);
35
-
36
- return $property->getValue($objectClass);
37
- } catch (ReflectionException $e) {
38
- $reflection = new ReflectionClass($objectClass);
39
- $properties = $reflection->getProperties();
40
-
41
- $message = sprintf('Instance field %s not found in class %s . Available fields:' . PHP_EOL,
42
- $fieldString,
43
- get_class($objectClass)
44
- );
45
-
46
- foreach ($properties as $property) {
47
- if ($property->isPublic()) {
48
- $message .= $property->getName() . PHP_EOL;
49
- }
50
- }
51
-
52
- throw new Exception($message);
53
- }
54
- }
55
- }
1
+ <?php
2
+
3
+ declare(strict_types=1);
4
+
5
+ namespace core\handler;
6
+
7
+ use ReflectionClass;
8
+ use ReflectionException;
9
+ use Exception;
10
+ use SebastianBergmann\CodeCoverage\Report\PHP;
11
+ use utils\CommandInterface;
12
+
13
+ final class GetInstanceFieldHandler extends AbstractHandler
14
+ {
15
+ private const REQUIRED_ARGUMENTS_COUNT = 2;
16
+
17
+ /**
18
+ * @return mixed
19
+ */
20
+ public function process(CommandInterface $command)
21
+ {
22
+ $this->validate($command, self::REQUIRED_ARGUMENTS_COUNT, self::class);
23
+
24
+ $objectClass = $command->getPayload()[0];
25
+ $fieldString = (string)$command->getPayload()[1];
26
+
27
+ try {
28
+ $reflection = new ReflectionClass($objectClass);
29
+ if (!$reflection->hasProperty($fieldString)) {
30
+ throw new ReflectionException(sprintf('Property %s not found', $fieldString));
31
+ }
32
+
33
+ $property = $reflection->getProperty($fieldString);
34
+ $property->setAccessible(true);
35
+
36
+ return $property->getValue($objectClass);
37
+ } catch (ReflectionException $e) {
38
+ $reflection = new ReflectionClass($objectClass);
39
+ $properties = $reflection->getProperties();
40
+
41
+ $message = sprintf('Instance field %s not found in class %s . Available fields:' . PHP_EOL,
42
+ $fieldString,
43
+ get_class($objectClass)
44
+ );
45
+
46
+ foreach ($properties as $property) {
47
+ if ($property->isPublic()) {
48
+ $message .= $property->getName() . PHP_EOL;
49
+ }
50
+ }
51
+
52
+ throw new Exception($message);
53
+ }
54
+ }
55
+ }
@@ -1,52 +1,52 @@
1
- <?php
2
-
3
- declare(strict_types=1);
4
-
5
- namespace core\handler;
6
-
7
- use ReflectionClass;
8
- use ReflectionException;
9
- use ReflectionMethod;
10
- use utils\CommandInterface;
11
-
12
- final class GetInstanceMethodAsDelegateHandler extends AbstractHandler
13
- {
14
- private const REQUIRED_ARGUMENTS_COUNT = 2;
15
-
16
- public function process(CommandInterface $command): ReflectionMethod
17
- {
18
- $this->validate($command, self::REQUIRED_ARGUMENTS_COUNT, self::class);
19
-
20
- $objectInstance = $command->getPayload()[0];
21
- $methodToInvoke = (string) $command->getPayload()[1];
22
-
23
- $argumentsTypes = array_slice($command->getPayload(), 2);
24
-
25
- $reflectionClass = new ReflectionClass($objectInstance);
26
-
27
- try {
28
- return $reflectionClass->getMethod($methodToInvoke);
29
- } catch (ReflectionException $e) {
30
- $methods = $reflectionClass->getMethods(ReflectionMethod::IS_PUBLIC);
31
- $message = sprintf('Instance method %s with arguments types [%s] not found in class %s. Available methods:' . PHP_EOL,
32
- $methodToInvoke,
33
- implode(', ', array_map('gettype', $argumentsTypes)),
34
- get_class($objectInstance)
35
- );
36
-
37
- foreach ($methods as $method) {
38
- $parameters = $method->getParameters();
39
- $paramTypes = array_map(function($param) {
40
- $type = $param->getType();
41
-
42
- return $type ? $type->getName() : 'mixed';
43
- }, $parameters);
44
-
45
- $message .= $method->getName() . ' with arguments [' .
46
- implode(', ', $paramTypes) . "]\n";
47
- }
48
-
49
- throw new ReflectionException($message, 0, $e);
50
- }
51
- }
52
- }
1
+ <?php
2
+
3
+ declare(strict_types=1);
4
+
5
+ namespace core\handler;
6
+
7
+ use ReflectionClass;
8
+ use ReflectionException;
9
+ use ReflectionMethod;
10
+ use utils\CommandInterface;
11
+
12
+ final class GetInstanceMethodAsDelegateHandler extends AbstractHandler
13
+ {
14
+ private const REQUIRED_ARGUMENTS_COUNT = 2;
15
+
16
+ public function process(CommandInterface $command): ReflectionMethod
17
+ {
18
+ $this->validate($command, self::REQUIRED_ARGUMENTS_COUNT, self::class);
19
+
20
+ $objectInstance = $command->getPayload()[0];
21
+ $methodToInvoke = (string) $command->getPayload()[1];
22
+
23
+ $argumentsTypes = array_slice($command->getPayload(), 2);
24
+
25
+ $reflectionClass = new ReflectionClass($objectInstance);
26
+
27
+ try {
28
+ return $reflectionClass->getMethod($methodToInvoke);
29
+ } catch (ReflectionException $e) {
30
+ $methods = $reflectionClass->getMethods(ReflectionMethod::IS_PUBLIC);
31
+ $message = sprintf('Instance method %s with arguments types [%s] not found in class %s. Available methods:' . PHP_EOL,
32
+ $methodToInvoke,
33
+ implode(', ', array_map('gettype', $argumentsTypes)),
34
+ get_class($objectInstance)
35
+ );
36
+
37
+ foreach ($methods as $method) {
38
+ $parameters = $method->getParameters();
39
+ $paramTypes = array_map(function($param) {
40
+ $type = $param->getType();
41
+
42
+ return $type ? $type->getName() : 'mixed';
43
+ }, $parameters);
44
+
45
+ $message .= $method->getName() . ' with arguments [' .
46
+ implode(', ', $paramTypes) . "]\n";
47
+ }
48
+
49
+ throw new ReflectionException($message, 0, $e);
50
+ }
51
+ }
52
+ }
@@ -1,15 +1,15 @@
1
- <?php
2
-
3
- declare(strict_types=1);
4
-
5
- namespace core\handler;
6
-
7
- use utils\CommandInterface;
8
-
9
- final class GetModuleHandler extends AbstractHandler
10
- {
11
- public function process(CommandInterface $command)
12
- {
13
- throw new \Exception(__CLASS__ . ' is not implemented in PHP');
14
- }
15
- }
1
+ <?php
2
+
3
+ declare(strict_types=1);
4
+
5
+ namespace core\handler;
6
+
7
+ use utils\CommandInterface;
8
+
9
+ final class GetModuleHandler extends AbstractHandler
10
+ {
11
+ public function process(CommandInterface $command)
12
+ {
13
+ throw new \Exception(__CLASS__ . ' is not implemented in PHP');
14
+ }
15
+ }
@@ -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 GetRefValueHandler 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 GetRefValueHandler extends AbstractHandler
10
+ {
11
+ public function process(CommandInterface $command)
12
+ {
13
+ throw new \Exception(__CLASS__ . ' is not implemented in PHP');
14
+ }
15
+ }
16
+