Recommend this page to a friend! |
Download .zip |
Info | Documentation | View files (63) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2022-10-21 (23 days ago) | 73% | Total: 417 This week: 5 | All time: 6,388 This week: 170 |
Version | License | PHP version | Categories | |||
php-generator 1.0.13 | MIT/X Consortium ... | 5.3.3 | PHP 5, Libraries, Code Generation |
Description | Author | |||
This package can generate PHP code elements programatically. Innovation Award
|
> PhpGenerator helps to generate PHP source code
Even if this project is yet another PHP source code generator, its main goal is to provide a consistent PHP source code generator for the PackageGenerator project. Nevertheless, it also aims to be used for any PHP source code generation process as it generates standard PHP code.
Rest assured that it is not tweaked for the purpose of the PackageGenerator project.
This project contains two main features:
Thanks to the Docker image of phpfarm, tests can be run locally under any PHP version using the cli: - php-7.4
First of all, you need to create your container which you can do using docker-compose by running the below command line from the root directory of the project:
$ docker-compose up -d --build
You then have a container named php_generator
in which you can run composer
commands and php cli
commands such as:
# install deps in container (using update ensure it does use the composer.lock file if there is any)
$ docker exec -it php_generator php-7.4 /usr/bin/composer update
# run tests in container
$ docker exec -it php_generator php-7.4 -dmemory_limit=-1 vendor/bin/phpunit
If you have a question, feel free to create an issue.
The MIT License (MIT). Please see License File for more information.
Files |
File | Role | Description | ||
---|---|---|---|---|
.docker (1 file) | ||||
src (2 directories) | ||||
tests (1 file, 3 directories) | ||||
.editorconfig | Data | Auxiliary data | ||
.php-cs-fixer.php | Example | Example script | ||
CHANGELOG.md | Data | Auxiliary data | ||
composer.json | Data | Auxiliary data | ||
docker-compose.yml | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
phpunit.xml.dist | Data | Auxiliary data | ||
README.md | Doc. | Documentation | ||
UPGRADE-3.0.md | Data | Auxiliary data | ||
UPGRADE-4.0.md | Data | Auxiliary data |
Files | / | src | / | Component |
File | Role | Description |
---|---|---|
AbstractComponent.php | Class | Class source |
GenerateableInterface.php | Class | Class source |
PhpClass.php | Class | Class source |
PhpFile.php | Class | Class source |
PhpInterface.php | Class | Class source |
README.md | Doc. | Documentation |
Files | / | src | / | Element |
File | Role | Description |
---|---|---|
AbstractElement.php | Class | Class source |
AccessRestrictedElementInterface.php | Class | Class source |
AccessRestrictedElementTrait.php | Class | Class source |
AssignedValueElementInterface.php | Class | Class source |
AssignedValueElementTrait.php | Class | Class source |
GenerateableInterface.php | Class | Class source |
PhpAnnotation.php | Class | Class source |
PhpAnnotationBlock.php | Class | Class source |
PhpClass.php | Class | Class source |
PhpConstant.php | Class | Class source |
PhpDeclare.php | Class | Class source |
PhpFile.php | Class | Class source |
PhpFunction.php | Class | Class source |
PhpFunctionParameter.php | Class | Class source |
PhpInterface.php | Class | Class source |
PhpMethod.php | Class | Class source |
PhpProperty.php | Class | Class source |
PhpVariable.php | Class | Class source |
README.md | Doc. | Documentation |
TypeHintedElementInterface.php | Class | Class source |
TypeHintedElementTrait.php | Class | Class source |
Files | / | tests |
File | Role | Description | ||
---|---|---|---|---|
Component (4 files) | ||||
Element (12 files) | ||||
resources (8 files) | ||||
TestCase.php | Test | Unit test script |
Files | / | tests | / | Component |
File | Role | Description |
---|---|---|
AbstractComponent.php | Test | Unit test script |
PhpClassTest.php | Test | Unit test script |
PhpFileTest.php | Test | Unit test script |
PhpInterfaceTest.php | Test | Unit test script |
Files | / | tests | / | Element |
File | Role | Description |
---|---|---|
PhpAnnotationBlockTest.php | Test | Unit test script |
PhpAnnotationTest.php | Test | Unit test script |
PhpClassTest.php | Test | Unit test script |
PhpConstantTest.php | Test | Unit test script |
PhpDeclareTest.php | Class | Class source |
PhpFileTest.php | Test | Unit test script |
PhpFunctionParameterTest.php | Test | Unit test script |
PhpFunctionTest.php | Test | Unit test script |
PhpInterfaceTest.php | Test | Unit test script |
PhpMethodTest.php | Test | Unit test script |
PhpPropertyTest.php | Test | Unit test script |
PhpVariableTest.php | Test | Unit test script |
Files | / | tests | / | resources |
File | Role | Description |
---|---|---|
PhpClassTest_SimpleToString.php | Test | Unit test script |
PhpClassTest_Simpl...rnTypePerMethod.php | Aux. | Auxiliary script |
PhpClassTest_Simpl...rnTypePerMethod.php | Aux. | Auxiliary script |
PhpFileTest_SimpleClassToString.php | Test | Unit test script |
PhpFileTest_Simple...gWithReturnType.php | Class | Class source |
PhpFileTest_SimpleInterfaceToString.php | Test | Unit test script |
PhpInterfaceTest_SimpleToString.php | Test | Unit test script |
PhpInterfaceTest_S...gWithReturnType.php | Aux. | Auxiliary script |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
User Ratings | ||||||||||||||||||||||||||||||
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.