Currently, framework doesn't support interception of final methods, but after switching to the AST-base transformers, it can be easily solved by asking offsets for the methods.
Idea of intercepting final methods is following.
We take original class Foo and make it's intercepted final method bar non-final. Then create child with this method and make it final to preserve final logic.
final class Foo{
final public function bar() {}
}
Will be converted to the:
class Foo__AopProxied{
public function bar() {}
}
final class Foo extends Foo__AopProxied {
final public function bar() {}
}
Currently, framework doesn't support interception of final methods, but after switching to the AST-base transformers, it can be easily solved by asking offsets for the methods.
Idea of intercepting final methods is following.
We take original class
Fooand make it's intercepted final methodbarnon-final. Then create child with this method and make it final to preserve final logic.Will be converted to the: