Recommend this page to a friend! |
Download .zip |
Info | View files (2) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2012-03-07 (4 years ago) | Not enough user ratings | Total: 324 | All time: 6,805 This week: 1,068 |
Version | License | PHP version | Categories | |||
arroba 1 | GNU General Publi... | 5.3 | PHP 5, Language |
Arroba : A simple and fast way to use annotations in php. The need is the mother of invention, everybody knows this. I needed to use annotations in php and a library that I found did not attend me in one aspect: I would have to extend that class and thar would be very bad to me because it would extend my classes from my other classes (ORM, plugins...). Arroba's syntax is simple to use because programming should be so. Creating or personalizing tags to use in your projects is now an easier job. See above: /** * Person * @author Evaldo Barbosa * @Table(table=tb_pessoa,pkey = id) */ class Person { /** * Primary Key * @type= integer * @notnull = true * @size=255 * @meta (conf1=mycond, conf2=your_c) * @meta1 (attribute1=value_meta1) */ private $id; private $nome; protected $hash; } Class Person has annotations and one of its attributes has annotations too. You see two distinct types of annotations and A treats both. See how to implement it with Arroba: //To instantiate Arroba $ref = new \Arroba\Arroba("Person"); //Getting a specific value of key of class annotation echo $ref->getClassAnnotation('@Model')->table; //Getting a specific value of key of attribute annotation echo $ref->getPropertyAnnotation("id", "@meta1")->attribute1; Why to get one annotation at a time? Because you should know each annotation to treat each one individually. |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.