File tree Expand file tree Collapse file tree 3 files changed +21
-13
lines changed
Core/JVM/Invoker/Extended Expand file tree Collapse file tree 3 files changed +21
-13
lines changed Original file line number Diff line number Diff line change @@ -235,8 +235,23 @@ function ($argument) {
235235 */
236236 $ executor = new $ fullName ();
237237
238+ $ executor
239+ ->setConstantPool ($ currentConstantPool )
240+ ->setParameters (
241+ $ method ,
242+ $ this ->javaClassInvoker ,
243+ $ reader ,
244+ $ localStorage ,
245+ $ stacks ,
246+ $ pointer ,
247+ $ dependencyInjectionProvider
248+ );
249+
238250 $ beforeTrigger = $ this ->options ['operations ' ]['injections ' ]['before ' ] ?? GlobalOptions::get ('operations.injections.before ' );
239251 if (is_callable ($ beforeTrigger )) {
252+ // Bind class
253+ \Closure::bind ($ beforeTrigger , $ this );
254+
240255 $ beforeTrigger (
241256 $ executor ,
242257 $ method ,
@@ -252,21 +267,13 @@ function ($argument) {
252267 }
253268
254269 // Run executor
255- $ executor
256- ->setConstantPool ($ currentConstantPool )
257- ->setParameters (
258- $ method ,
259- $ this ->javaClassInvoker ,
260- $ reader ,
261- $ localStorage ,
262- $ stacks ,
263- $ pointer ,
264- $ dependencyInjectionProvider
265- )
266- ->execute ();
270+ $ executor ->execute ();
267271
268272 $ afterTrigger = $ this ->options ['operations ' ]['injections ' ]['after ' ] ?? GlobalOptions::get ('operations.injections.after ' );
269273 if (is_callable ($ afterTrigger )) {
274+ // Bind class
275+ \Closure::bind ($ beforeTrigger , $ this );
276+
270277 $ afterTrigger (
271278 $ executor ,
272279 $ method ,
Original file line number Diff line number Diff line change 33
44use PHPJava \Exceptions \OperationException ;
55
6- final class Operands implements \ArrayAccess
6+ final class Operands implements \ArrayAccess, \Countable
77{
88 private $ operands = [];
99
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ public function getOperands(): ?Operands
1616 if ($ this ->operands !== null ) {
1717 return $ this ->operands ;
1818 }
19+
1920 $ indexbyte = $ this ->readUnsignedShort ();
2021
2122 return $ this ->operands = new Operands (
You can’t perform that action at this time.
0 commit comments