Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40013 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13937 invoked from network); 20 Aug 2008 14:00:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Aug 2008 14:00:33 -0000 Received: from [127.0.0.1] ([127.0.0.1:23510]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id 0D/9C-51571-1832CA84 for ; Wed, 20 Aug 2008 10:00:33 -0400 X-Host-Fingerprint: 194.44.247.140 unknown Received: from [194.44.247.140] ([194.44.247.140:5568] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8C/C1-14056-B80DAA84 for ; Tue, 19 Aug 2008 09:54:21 -0400 Message-ID: <8C.C1.14056.B80DAA84@pb1.pair.com> To: internals@lists.php.net Date: Tue, 19 Aug 2008 16:54:16 +0300 User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 194.44.247.140 Subject: Annotations Request From: viatsyshyn@gmail.com (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 DemoAnnotation2 extends C01t_Annotation { public $p1; public $p2; } class DemoClass { const SOME_CONST = 5; /** @DemoAnnotation1(DemoClass::SOME_CONST + 1) */ public $property1; /** @DemoAnnotation2(p1 => 1, p2 => 'Hello, Word!') */ public $property2; } Thanks, Volodymyr Iatsyshyn