Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40080 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60048 invoked from network); 25 Aug 2008 12:24:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Aug 2008 12:24:53 -0000 X-Host-Fingerprint: 212.113.55.217 212.113.55.217.utel.net.ua Received: from [212.113.55.217] ([212.113.55.217:21070] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 02/A8-16893-394A2B84 for ; Mon, 25 Aug 2008 08:24:51 -0400 Message-ID: <02.A8.16893.394A2B84@pb1.pair.com> To: internals@lists.php.net Date: Mon, 25 Aug 2008 15:24:27 +0300 User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 References: <8C.C1.14056.B80DAA84@pb1.pair.com> In-Reply-To: <8C.C1.14056.B80DAA84@pb1.pair.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 212.113.55.217 Subject: Re: Annotations Request From: viatsyshyn@gmail.com (Volodymyr Iatsyshyn) Volodymyr Iatsyshyn 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 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 So is there a chance to have these?