Download the PHP package thuata/intercessionbundle without Composer
On this page you can find all versions of the php package thuata/intercessionbundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download thuata/intercessionbundle
More information about thuata/intercessionbundle
Files in thuata/intercessionbundle
Package intercessionbundle
Short Description Bundle to help code generation
License MIT
Informations about the package intercessionbundle
Intercession Bundle
Intercession principle
Intercession is the ability of a program to modify its own execution state. That mean intercession allows to generate and execute some code in live during the program execution.
The Intercession bundle is meant to generate class definitions and eventualy write it in a file. You are then free to include / require the file lively to have the new generated class available. The bundle provides also tools to add phpdoc.
Warning
Take in consideration that code generation, if not safely used can be very dangerous and harmfull for your applications. You should only use intercession with code you understand. Using intercession with unsafe code or code from uncertain source (like from a form request) should be done in specific environments (ie. containers or virtual systems ).
Being aware of that intercession can be a very powerfull tool.
Installation
Step 1: Download the Bundle
In your composer.json file add the following lines :
or directly with composer on command line :
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Step 2: Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles
in the app/AppKernel.php
file of your project:
Usage
The intercession bundle provides some classes to prepare the Class, Methods and Properties definitions and a service to generate definition and / or write it in a file.
Here is a simple example that defines a class in a namspace. The class extends another one, implements some interfaces and uses some traits. It as a description and an author (for phpdoc)
A more complete document is coming.
Next steps
This version is 1.0. It provides only definition generation.
next steps will provide :
- A full documentation
- Live edition of classes, even after instantiation
All versions of intercessionbundle with dependencies
symfony/symfony Version ^3
thuata/componentbundle Version ^1
incenteev/composer-parameter-handler Version ~2.0