This is a convenience function to weave a
before advice based on advise().
This is a shortcut function to weave one
before advice with an object’s method. Logically it is defined as:
1 2 3 4 5
It means that instead of:
1 2 3
It is possible to write a shorter version:
This type of advice is a regular function. It is called with the same context and the same arguments as an advised method. Its return value is ignored.
It is not recommended to modify parameters inside
before advice. Use
around advice for that.
Just like advise() it is based on, it returns an opaque object with a single method:
unadvise(). Calling it without parameters removes all advices set with that call to
In order to be compatible with general destruction mechanisms it defines one more method:
destroy(), which is
an alias to