dcl.before()
Version 2.x
This is a convenience decorator to define a before
advice based on dcl.advise().
Description
This is a shortcut function to define one before
advice. 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:
1
|
|
Advice function
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 after
or around
advice for that.