How Roda's plugin system works
masterRoda is designed to be lightweight by moving almost all functionality into plugins. The core Roda class is mostly empty, relying on the Roda::RodaPlugins::Base plugin for default behavior.
When a plugin is loaded, it can extend the application in several ways:
- Instance Methods: Added to the Roda instance (available inside the
routeblock). - Class Methods: Added to the Roda class itself.
- Request Methods: Added to the
RodaRequestclass (therobject). - Request Class Methods: Added to the
RodaRequestclass. - Response Methods: Added to the
RodaResponseclass. - Response Class Methods: Added to the
RodaResponseclass.
This architecture allows plugins to modify every layer of the request/response lifecycle.