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

Allow to use '$this->pointcutName' in pointcuts with dynamic aspect inheritance #73

Closed
lisachenko opened this issue Jul 15, 2013 · 0 comments

Comments

@lisachenko
Copy link
Member

Currently, pointcut can be referenced only by full name:

    /**
     * Pointcut for example class
     *
     * @Pointcut("execution(public Demo\Example\General->*(*))")
     */
    protected function examplePublicMethods() {}

    /**
     * Method that should be called before real method
     *
     * @param MethodInvocation $invocation Invocation
     * @Before("Demo\Aspect\DebugAspect->examplePublicMethods")
     */

This prevents from using of abstract pointcuts and make it harder to write FQN of aspect without auto-completion.

New feature allows to use $this instead of FQN of aspect:

    /**
     * Method that should be called before real method
     *
     * @param MethodInvocation $invocation Invocation
     * @Before("$this->examplePublicMethods")
     */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant