diff --git a/src/Php/CompilerBase.php b/src/Php/CompilerBase.php index d8739c5b..dc0774c8 100644 --- a/src/Php/CompilerBase.php +++ b/src/Php/CompilerBase.php @@ -9,6 +9,11 @@ namespace PhpAot\Php; use League\CLImate\CLImate; +use PhpAot\Php\Entity\ClassDef; +use PhpAot\Php\Entity\FunctionDef; +use PhpAot\Php\Entity\InterfaceDef; +use PhpAot\Php\Entity\MethodDef; +use PhpAot\Php\Entity\PropertyDef; use PhpAot\Php\Exception\Redo; use PhpAot\Php\Exception\Skip; use PhpParser\Modifiers; diff --git a/src/Php/ClassDef.php b/src/Php/Entity/ClassDef.php similarity index 97% rename from src/Php/ClassDef.php rename to src/Php/Entity/ClassDef.php index c767cb70..8018b8bc 100644 --- a/src/Php/ClassDef.php +++ b/src/Php/Entity/ClassDef.php @@ -6,7 +6,7 @@ * @contact service@swoole.com */ -namespace PhpAot\Php; +namespace PhpAot\Php\Entity; class ClassDef extends ClassLikeDef { diff --git a/src/Php/ClassLikeDef.php b/src/Php/Entity/ClassLikeDef.php similarity index 96% rename from src/Php/ClassLikeDef.php rename to src/Php/Entity/ClassLikeDef.php index 77390874..ade9c4b7 100644 --- a/src/Php/ClassLikeDef.php +++ b/src/Php/Entity/ClassLikeDef.php @@ -6,7 +6,7 @@ * @contact service@swoole.com */ -namespace PhpAot\Php; +namespace PhpAot\Php\Entity; class ClassLikeDef { diff --git a/src/Php/ConstantDef.php b/src/Php/Entity/ConstantDef.php similarity index 94% rename from src/Php/ConstantDef.php rename to src/Php/Entity/ConstantDef.php index dd546193..3c5d36f6 100644 --- a/src/Php/ConstantDef.php +++ b/src/Php/Entity/ConstantDef.php @@ -6,7 +6,7 @@ * @contact service@swoole.com */ -namespace PhpAot\Php; +namespace PhpAot\Php\Entity; class ConstantDef { diff --git a/src/Php/FunctionDef.php b/src/Php/Entity/FunctionDef.php similarity index 91% rename from src/Php/FunctionDef.php rename to src/Php/Entity/FunctionDef.php index 51adf5b8..e6bf0875 100644 --- a/src/Php/FunctionDef.php +++ b/src/Php/Entity/FunctionDef.php @@ -6,7 +6,9 @@ * @contact service@swoole.com */ -namespace PhpAot\Php; +namespace PhpAot\Php\Entity; + +use PhpAot\Php\ArgInfo; class FunctionDef { diff --git a/src/Php/InterfaceDef.php b/src/Php/Entity/InterfaceDef.php similarity index 91% rename from src/Php/InterfaceDef.php rename to src/Php/Entity/InterfaceDef.php index c263f09d..019b4e9f 100644 --- a/src/Php/InterfaceDef.php +++ b/src/Php/Entity/InterfaceDef.php @@ -6,7 +6,7 @@ * @contact service@swoole.com */ -namespace PhpAot\Php; +namespace PhpAot\Php\Entity; class InterfaceDef extends ClassLikeDef { diff --git a/src/Php/MethodDef.php b/src/Php/Entity/MethodDef.php similarity index 95% rename from src/Php/MethodDef.php rename to src/Php/Entity/MethodDef.php index a1ff7a0b..ce78aafd 100644 --- a/src/Php/MethodDef.php +++ b/src/Php/Entity/MethodDef.php @@ -6,7 +6,7 @@ * @contact service@swoole.com */ -namespace PhpAot\Php; +namespace PhpAot\Php\Entity; class MethodDef { diff --git a/src/Php/PropertyDef.php b/src/Php/Entity/PropertyDef.php similarity index 97% rename from src/Php/PropertyDef.php rename to src/Php/Entity/PropertyDef.php index 614ae7d4..e2160fc2 100644 --- a/src/Php/PropertyDef.php +++ b/src/Php/Entity/PropertyDef.php @@ -6,7 +6,7 @@ * @contact service@swoole.com */ -namespace PhpAot\Php; +namespace PhpAot\Php\Entity; use PhpParser\Modifiers; diff --git a/src/Php/MagicMethodDetector.php b/src/Php/MagicMethodDetector.php index 17b1ad24..e8cd4a19 100644 --- a/src/Php/MagicMethodDetector.php +++ b/src/Php/MagicMethodDetector.php @@ -8,6 +8,7 @@ namespace PhpAot\Php; +use PhpAot\Php\Entity\MethodDef; use PhpParser\NodeAbstract; trait MagicMethodDetector diff --git a/src/Php/Translator.php b/src/Php/Translator.php index fa857cdd..00dfe27f 100644 --- a/src/Php/Translator.php +++ b/src/Php/Translator.php @@ -9,6 +9,13 @@ namespace PhpAot\Php; use MJS\TopSort\Implementations\StringSort; +use PhpAot\Php\Entity\ClassDef; +use PhpAot\Php\Entity\ClassLikeDef; +use PhpAot\Php\Entity\ConstantDef; +use PhpAot\Php\Entity\FunctionDef; +use PhpAot\Php\Entity\InterfaceDef; +use PhpAot\Php\Entity\MethodDef; +use PhpAot\Php\Entity\PropertyDef; use PhpAot\Php\Exception\Redo; use PhpParser\Modifiers; use PhpParser\Node;