Re: [RFC] Reflection annotations reader

From: Date: Wed, 09 Jan 2013 12:15:27 +0000
Subject: Re: [RFC] Reflection annotations reader
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Well, Derick,


> And really, nobody can convince me that we would need stuff like:
>
> @MyApp\Acl({
>     "allow"=@MyApp\Acl\Allow({"john"="read",
> "joe"="write"}),
>     "deny"=@OtherApp\Acl\Deny(default="*", log=true)
> })
>
> cheers,
> Derick
>


that actually worked quite well in an old ZF1 MVC app I developed, and was
easier to read than having to map all things somewhere else :)

I had each method annotated with the roles allowed to access and eventually
with custom ACL rules (nested annotations).

And it is also very useful for validations and forms generated from
classes+metadata.

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/


Thread (78 messages)

« previous php.internals (#64734) next »