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

How to not-inherit an annotation method #202

Open
JSorella opened this issue Feb 12, 2016 · 0 comments
Open

How to not-inherit an annotation method #202

JSorella opened this issue Feb 12, 2016 · 0 comments

Comments

@JSorella
Copy link

Hello community,

I need to do something very specific and I just didn't found out a solution to this.

Suppose I have these two classes:

/**
 * Class 1
 */
class SuperClass
{
    /**
     * My Method
     * @myAnnotation
     */
    public function myMethod()
    {

    }
}

/**
 * Class 2
 */
class OddClass extends SuperClass
{
    /**
     * Overriden Method with no annotations
     */
    public function myMethod()
    {
          //I don't want myAnnotation() to be executed! >:(
    }
}

So that's it. I have a "SuperClass" with a method that needs an annotation to be executed ever. But there is an "OddClass" that doesn't want that annotation to be executed in the overrided method.

Is this possible? How can I do that without changing all my logic?

Thanks in advance!

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

1 participant