Download the PHP package kanel/enuma without Composer
On this page you can find all versions of the php package kanel/enuma. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package enuma
Short Description Dynamically Create and Edit php classes, interfaces and traits
License
Informations about the package enuma
Enuma
Package that will help you create and Edit php classes, interfaces and traits dynamically
Create classes, interfaces and traits
Basic usage
- Create a class
will create or rewrite the file with :
- Create an interface
will create or rewrite the file with :
- Create a trait
will create or rewrite the file with :
Advanced usage
Coding style
Default coding style is PSR2. If you need to customize it you can :
- Encoding
Default PSR2 encoding is UTF-8, if you want to use yours :
- Php Closing Tag
Default behaviour is not having the ?> closing tag If you want to have it :
- Indentation
Default behaviour is 4 spaces, If you want to change it (only space characters allowed):
- Class braces
Default behaviour is class opening braces in new line, If you want to have them on same line as the class:
- Method braces
Default behaviour is method's opening braces in new line, If you want to have them on same line as the method:
- Unix line feed
Default behaviour is having an extra new line after class braces closing, If you don't want to have it:
- Windows new line
Default behaviour is Unix new line \n Ifw you want to have windows new line \r\n:
- Array annotation
Default behaviour is short annotation [] If you want to use standard annotation array() :
- Auto comments
Default behaviour is adding automatic @param and @return comments for methods If you don't want to have them:
Class creation
you can define many things when creating a class/interface/trait :
- Coding style:
will output:
- Namespace
Works for : PhpClass, PhpInterface and PhpTrait
will output:
- Use classes
Works for : PhpClass, PhpInterface and PhpTrait
will output:
- Class comment
Works for : PhpClass, PhpInterface and PhpTrait
will output:
- Make class Abstract
Only Works for PhpClass
will output:
- Make class Final
Only Works for PhpClass
will output:
Since a class can either be final or abstract, setting one to true automatically sets the other to false.
- Extend a class
Only Works for PhpClass
will output:
- Implement interfaces
Only Works for PhpClass
will output:
- Use a trait
Works for PhpClass and PhpTrait
will output:
- add a Constant
Works for PhpClass and PhpInterface
will output:
10.1. add a Property
Works for PhpClass and PhpTrait
will output:
10.2. Set a visibility for a property
You can specify a visibility for the property using the Hint class constants:
will output:
10.3. Set a property as static
will output:
10.4. Set a property's default value
will output:
- add a Method
Works for : PhpClass, PhpInterface and PhpTrait
will output:
11.1. add a Method Visibility
For interfaces, visibility is always public
will output:
11.2. Set Method as static
will output:
11.3. Set Method as abstract (and the class implicitly)
will output:
11.4. Set Method as final
will output:
Since a method can either be final or abstract, setting one to true automatically sets the other to false.
11.5. add Method comment
will output:
11.6. add Method Return type
will output:
11.6. add Method parameters
will output:
Edit classes
Coming soon