Skip to content

How to not-inherit an annotation method #202

@JSorella

Description

@JSorella

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions