shortcuts are a series of special functions. They’re used to simplify the complex operations, according to the configuration specified by the related keyword, set after a URL-rule.
It was named OHT which stands for Optional Handler Table, which indicates the basic principle to be implemented. But it was too hard to remember. So let’s just call it shortcut.
Anyway, you may find them in the module (artanis oht).
It’s good practice to use shortcuts as possible and avoid calling low-level APIs.
Each shortcut consists of 2 parts: config and apply.
config is to configure a certain service for the specific URL rule. This configuration will only be availble to this URL rule, and independent to other registered URL rules.
apply is used to call specific functions related to your configuration in the config step. The first argument of the apply method must be a route-context
(route context).