You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be possible to intercept calls / accesses made by a handler to $this, without replacing the original handler.
This means we can register on_call type events that are fired when a filter / action handler tries to access it's own $this. We can then either return a new value to skip execution of the $this->some_method() call, or return null to allow the call to continue.
This is a huge rabbit hole, and will need some thought. In theory we could pre and post process any object accessor similar to how we inject().
Create event trigger / handler subsystem
Intercept object method calls
Override and skip object method calls
Intercept property accesses
Intercept property writes
Recursive HookProxy works (ie. proxying-a-proxy should proxy the original object)
It should be possible to intercept calls / accesses made by a handler to
$this
, without replacing the original handler.This means we can register
on_call
type events that are fired when a filter / action handler tries to access it's own$this
. We can then either return a new value to skip execution of the$this->some_method()
call, or returnnull
to allow the call to continue.This is a huge rabbit hole, and will need some thought. In theory we could pre and post process any object accessor similar to how we
inject()
.HookProxy
works (ie. proxying-a-proxy should proxy the original object)Branch feature/intercept tracks this feature.
The text was updated successfully, but these errors were encountered: