Re: Annotations Request
| From: | Paweł Stradomski | Date: | Thu, 21 Aug 2008 09:15:13 +0000 |
| Subject: | Re: Annotations Request | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-40041@lists.php.net to get a copy of this message | ||
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 assigns parameters. This solution is fine just now, but it
> will be very cool to have annotations as language feature. I'm pretty
> sure that lots of frameworks would like this feature :-)
>
I understand, as I'm simulating those myself (although in a different way).
But we'd love annotations for situations such as the one I presented before,
as well as WSDL generation etc.
Instead of using annotations we use something like that:
class X {
public static myMethod_methods = array('POST', 'GET');
public static myMethod_access = 'any';
public function myMethod() {....}
}
--
Paweł Stradomski