Using Quanta hooks
Using hooks in a custom module, allows you to interact with the Quanta flow, adding your personal functionalities to common site routines (viewing a node, loading a page, submitting a form...), and changing the way they normally behave.
Before we start talking about it, be sure you are already familiar with the concept of hooking.
How to implement a hook in a custom Quanta module
Each module or class, can provide hook through the use of Environment's hook method.
So in example, running (anywhere in your module) the function $env->hook('checkfruits', $vars)
Will trigger a 'checkfruits' hook.
This means, other modules can then respond to the hook, and alter the objects passed by reference into $vars.
Common core hooks
There are several hooks already implemented in core modules, that you can use to interact with basic Quanta processes.
Some examples are:
hook_doctor_DOCTORACTION (check, setup, etc.)