Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92619 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 32178 invoked from network); 21 Apr 2016 23:09:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Apr 2016 23:09:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=colinodell@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=colinodell@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.51 as permitted sender) X-PHP-List-Original-Sender: colinodell@gmail.com X-Host-Fingerprint: 209.85.218.51 mail-oi0-f51.google.com Received: from [209.85.218.51] ([209.85.218.51:33631] helo=mail-oi0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DD/4A-14036-7BD59175 for ; Thu, 21 Apr 2016 19:09:43 -0400 Received: by mail-oi0-f51.google.com with SMTP id r78so102364769oie.0 for ; Thu, 21 Apr 2016 16:09:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=gOuwRSzSiAFVtiy8PkZiu3X1PF8UuzVu5KCXSE3SZWU=; b=EjW3ivOCqNIyJZBdcqX7e18xqzrtAKn0s9Yo33IKQw2C4bKt36i1axpPPow//yB3eM kPzudPpTHy2MOF2FGufVQJmHZjGTu1RE3PN9pkflZYqscG0CKbc1SMsloyNZetVfJgNZ +3F9T0/X8q3DHe+J36difHEEYSTAYBed3gAZ/VHkWdqymBm+gCyr4lWWvPh54tTjN7kq uGFTKOxGwATsBJqHiBES/ijTA5FPfOS9nfbKGQG+qN8HL0d46QYIf75TiN+qxD/wd50N HgUpffSvEv4V8gssrjc2MLwTxsS50t2PghkFpcfCk2EsYdT6ObykBjNvKZEsjHEj7Shh LUEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=gOuwRSzSiAFVtiy8PkZiu3X1PF8UuzVu5KCXSE3SZWU=; b=VjxQMrvV8wOJoFH4J2uNM/Tdty2cvLODVyJvXEZbmHuoCLf9Zrpi2dUSgHfm3HIqYu xH4bfyyYZ2NKM9iLHTlCe2VnobRnzEsCY5CWCJVg0Vo/DxHfoaW/piykombxx6bz2xid OZ+xfyeMTD52FcVtr7y8luJp+mPyET123wQo/FWfzP5UsDb7cELyatwCb4qTpGpi+ZhQ B7Qg5TF2a125vHcMMkzbBkrTHd4z7jI27wwiGX+hkhWyJ8+bVvSbnNpoCUI2g9DlR6fo Gv2XUkouUHfBNImENnzg2paDDIxJOGSgERtlqC2uEkvCYu2PMDO1Otz+vnT57Hi37k1d IgJA== X-Gm-Message-State: AOPr4FVWR2UnKm+DbfcfjX1OjWlkDEeXlBwPMu344h+Ew+DZhPqL8CsTf4YgQxjh+t1fisGNmOlx52+VOvc9+Q== X-Received: by 10.202.222.5 with SMTP id v5mr7264487oig.82.1461280180627; Thu, 21 Apr 2016 16:09:40 -0700 (PDT) MIME-Version: 1.0 References: <5719598E.4000006@zend.com> In-Reply-To: <5719598E.4000006@zend.com> Date: Thu, 21 Apr 2016 23:09:31 +0000 Message-ID: To: Dmitry Stogov , Benjamin Eberlei , PHP internals list Content-Type: multipart/alternative; boundary=001a113ce7a8156f8a053106ce80 Subject: Re: [PHP-DEV] [RFC] PHP Attributes From: colinodell@gmail.com ("Colin O'Dell") --001a113ce7a8156f8a053106ce80 Content-Type: text/plain; charset=UTF-8 > A more robust alternative would be something along the same lines that > Doctrine uses: Make annotations actual classes. Just spitballing here - what if both approaches were supported, but class-based annotations were prefixed with a special character (perhaps "@") to differentiate them? For example: <> <<@ORM\Entity(table => "foo")>> class Foo { // ... } namespace ORM; class Entity implements \Attribute { // ... } $r = new ReflectionClass('ORM\Entity'); var_dump($r->getAttributes()); ----- array(2) { ["ArbitraryAnnotation"]=> string(11) "Hello world" ["ORM\Entity"] => object(ORM\Entity)#1 (0) { ... } } ----- Again, I'm not necessarily advocating this - just throwing the idea out there for discussion. Regards, Colin --001a113ce7a8156f8a053106ce80--