Download the PHP package antares/accessible without Composer
On this page you can find all versions of the php package antares/accessible. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download antares/accessible
More information about antares/accessible
Files in antares/accessible
Package accessible
Short Description PHP library that allows you to define your class' getters, setters and constructor with docblock annotations.
License MIT
Homepage https://github.com/antares993/Accessible
Informations about the package accessible
Accessible
Accessible is a PHP library that allows you to define your class behavior in an elegant and powerful way using docblock annotations.
This way, you can define your class' getters, setters and constructor, and automate collections and association management.
Here is a (very) basic example with getters and setters:
Another example using collections related annotations:
More complex examples are available in the doc.
What this library can manage in your classes:
- Getters and setters
- Validation on setters parameters using Symfony's Assertion annotations
- Constructor and properties initialization
- Collections
- Associations between classes
Suggestions and contributions are welcome!
Documentation
- How to define getters and setters
- How to define the class constructor and the properties initialization
- How to enable / disable the constraints validation
- How to manage collections
- How to manage associations
- How to modify the default configuration
- Compatibility issues (and how to solve them)
Install
If you want to use this library in your Symfony project, take a look at AccessibleBundle.
You can add this library as a dependency using composer this way:
This library uses the Doctrine annotations library, so if it is not already done you must register the Composer loader in the annotation registry:
You may want to change the default configuration, to do this see the Configuration dedicated page.
Compatibility
This library is compatible with PHP 5.4+, PHP 7 and HHVM.
All versions of accessible with dependencies
doctrine/annotations Version >=1.2.0
doctrine/cache Version >=1.0
doctrine/inflector Version >=1.0
symfony/validator Version >=2.6