Skip to content

Commit 11d9ea1

Browse files
committed
Update
1 parent afb6358 commit 11d9ea1

4 files changed

Lines changed: 9 additions & 3 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "JVM emulator by PHP",
44
"type": "library",
55
"license": "MIT",
6-
"version": "0.0.6.3-dev",
6+
"version": "0.0.6.4-dev",
77
"authors": [
88
{
99
"name": "memory"

src/Core/JVM/Parameters/Runtime.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@ final class Runtime
2727
];
2828

2929
const PHP_IMITATION_DIRECTORY = '\\PHPJava\\Imitation';
30+
31+
const PREFIX_STATIC = 'static_';
3032
}

src/Core/PHPJava.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ final class PHPJava
1212
/**
1313
* As same as composer version.
1414
*/
15-
const VERSION = 0x000063;
15+
const VERSION = 0x000064;
1616
}

src/Kernel/Mnemonics/_invokestatic.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
22
namespace PHPJava\Kernel\Mnemonics;
33

4+
use PHPJava\Core\JVM\Parameters\GlobalOptions;
5+
use PHPJava\Core\JVM\Parameters\Runtime;
46
use PHPJava\Exceptions\NotImplementedException;
57
use PHPJava\Utilities\BinaryTool;
68
use PHPJava\Utilities\ClassResolver;
@@ -28,6 +30,8 @@ public function execute(): void
2830
krsort($arguments);
2931
$return = null;
3032

33+
$prefix = $this->getOptions('prefix_static') ?? GlobalOptions::get('prefix_static') ?? Runtime::PREFIX_STATIC;
34+
3135
switch ($resourceType) {
3236
case ClassResolver::RESOLVED_TYPE_CLASS:
3337
/**
@@ -46,7 +50,7 @@ public function execute(): void
4650
$return = forward_static_call_array(
4751
[
4852
$classObject,
49-
"static_{$methodName}"
53+
"{$prefix}_{$methodName}"
5054
],
5155
$arguments
5256
);

0 commit comments

Comments
 (0)