Open WalterWoshid opened 1 year ago
Hi @jakublabno, I believe this is a feature you wanted, check out PHP-AOP: 1.2.8
:)
This is not yet documented, but the only thing you have to do is extend the dependencyInjectionHandler
method in your AopKernel
and pass in a Closure
which accepts a class-string
of the Aspect and should return an instance of that Aspect.
You can also look at the CustomDependencyInjectionHandler
test for a better example!
Maybe a protected method in the kernel that allows to add custom logic for dependency injection when instantiating new aspects