Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64634 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57969 invoked from network); 7 Jan 2013 14:17:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jan 2013 14:17:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=v.veselinov@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=v.veselinov@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.175 as permitted sender) X-PHP-List-Original-Sender: v.veselinov@gmail.com X-Host-Fingerprint: 209.85.216.175 mail-qc0-f175.google.com Received: from [209.85.216.175] ([209.85.216.175:65103] helo=mail-qc0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5C/80-52518-EF8DAE05 for ; Mon, 07 Jan 2013 09:17:34 -0500 Received: by mail-qc0-f175.google.com with SMTP id j3so12522139qcs.34 for ; Mon, 07 Jan 2013 06:17:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=WFXohwgX+/rd/RC1/Obj+ZHpTXmqACqRMwQvlggYiU4=; b=v1XIlpA1Upw+iyMK8iNuR7k+u72UTCMeHWECu6pCD048LEkx8D1qLUGc2N+z4uhbDT mzfwZvPXTCauFPLm+IJXsip8xezfqtq5Frum3D0gUC8Cy9gIo/aOPDYLvb30Zdr847rx I2uikeFGhBvqUDWUjhqEQ4p/K0gs2cQVTIibHgSlX72rksiJbZRStkLCOJGbwS3hE+8l cY7WQwQWqt6o/bkqBNJek5fKpgPIHklLzLweVA6yGy9uHA/XoQeyizKJ+Koj/kOL1Nkh e0Zi+6sjEyZLbhDpXw75D6ZRA1Fg9ND1OEJRfVVVzj9eGDPtqaE/qG904F8VOtw0+bcl alzA== MIME-Version: 1.0 Received: by 10.224.202.1 with SMTP id fc1mr42355811qab.60.1357568251172; Mon, 07 Jan 2013 06:17:31 -0800 (PST) Received: by 10.49.103.129 with HTTP; Mon, 7 Jan 2013 06:17:31 -0800 (PST) Date: Mon, 7 Jan 2013 16:17:31 +0200 Message-ID: To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: Reflection annotations reader From: v.veselinov@gmail.com (Vladislav Veselinov) Hey everybody, I've been following this list for a while (1-2 years) and this is the first message I'm sending. In my oppinion, annotations in docblocks are a bit(a lot) hacky and making it even worse by adding them to core is not the best idea. This is how I think annotations have to look like if implemented in core (I've taken on of the annotation classes in Doctrine and transformed it). Declaration: namespace Doctrine\ORM\Mapping; use SplAnnotation, SplAnnotationInterface; @Target({'PROPERTY', 'ANNOTATION'}) class JoinColumn implements SplAnnotation { @SplAnnotation\String private $name; @SplAnnotation\Boolean private $unique; @SplAnnotation\Mixed private $onDelete; @SplAnnotation\String private $referencedColumn = 'id'; } Usage: