Re: [PHP-DEV] Annotations Request

2008-08-21 Thread Paweł Stradomski
W liście Volodymyr Iatsyshyn z dnia czwartek 21 sierpnia 2008: > Now I use emulation of Java Annotations. I wrote simple class, that uses > PHPDoc block, gets annotations declarations and their arguments, uses > eval() to convert arguments string to array, then I create instance of > class and assi

Re: [PHP-DEV] Annotations Request

2008-08-21 Thread Volodymyr Iatsyshyn
Now I use emulation of Java Annotations. I wrote simple class, that uses PHPDoc block, gets annotations declarations and their arguments, uses eval() to convert arguments string to array, then I create instance of class and assigns parameters. This solution is fine just now, but it will be very

Re: [PHP-DEV] Annotations Request

2008-08-20 Thread Paweł Stradomski
W liście Marcus Boerger z dnia środa, 20 sierpnia 2008: > Hello Volodymyr, > Basically there is no need for annotations in PHP unlike there is in Python > for instance. However, while the following work: > php -r 'class T { const C=42; var $p=T::C; } var_dump(new T);' > php -r 'class T { const C=4

Re: [PHP-DEV] Annotations Request

2008-08-20 Thread Marcus Boerger
Hello Volodymyr, Tuesday, August 19, 2008, 3:54:16 PM, you wrote: > Hi, > Is there a chance to have annotations like in Java or like .NET attributes? > Now, I use Java Annotations emulation, through Reflections and PHPDoc > blocks. Example: > /** Annotation One*/ > class DemoAnnotation1 exten

[PHP-DEV] Annotations Request

2008-08-20 Thread Volodymyr Iatsyshyn
Hi, Is there a chance to have annotations like in Java or like .NET attributes? Now, I use Java Annotations emulation, through Reflections and PHPDoc blocks. Example: /** Annotation One*/ class DemoAnnotation1 extends C01t_Annotation { public $value; } /** Annotation Two*/ class DemoAnno