Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for annotations #88

Open
texdc opened this issue Oct 20, 2014 · 1 comment
Open

Add support for annotations #88

texdc opened this issue Oct 20, 2014 · 1 comment

Comments

@texdc
Copy link

texdc commented Oct 20, 2014

I'd like to design classes with advice in the docblocks something like:

/**
 * @@around \TestLib\debug
 */
class Foo
{
    /**
     * @@before \AuthorizationLib\authorize
     */
    public function bar()
    {
        // ...
    }

    /**
     * @@after \LogLib\log
     */
    public function baz()
    {
         // ...
    }
}

Maybe @@ will help to distinguish between advice and documentation. Thanks!

@Nicolab
Copy link

Nicolab commented Oct 20, 2014

I think the idea is interesting but it would reduce performance only to add some syntactic sugar, that wouldn’t be used by everyone.

It can be implemented separately on top of aop-php, otherwise like https://github.com/lisachenko/go-aop-php (it is not based on php-aop).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants