Attributing

Last modified: 24 March 2024

To attribute request you need an attribute - class that implements Articus\PathHandler\Attribute\AttributeInterface:

... and is registered in configuration:

To use attribute for operation in your handler you just need to annotate operation method:

It is possible to pass configuration options to your attribute factory:

If all operations in your handler need same attribute you can just annotate handler class insteadof annotating each method:

If you set multiple attributes for operation they will be invoked in the same order they appear in code:

Or you can adjust this order with priority setting (default value is 1). Attributes with higher priority will be executed earlier: