You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a plugin system that would allow third-party extensions to interface with Dandelion. This would require several things. The first being a hook system. Proposed main application hooks: before run, after run, before route, after route, before api dispatch, after api dispatch. Each API module, and controllers can also have their own hooks if desired. This can be a gradual roll out. The data given to the hook's callbacks would differ depending on which hook is being called. A base plugin class could be created that would provide basic necessities such as database access and configuration access. This would allow plugins to have their own custom configurations as part of the Dandelion main config file. Each hook can have multiple callbacks and will called in the order they were registered. The main configuration would have a new property called plugins which would be an array of plugin names. They would be loaded in the order of this array. The called file would be something like [dir-to-plugins]/{plugin-slug}/main.php. This main.php file would be responsible for registering its hooks and including any files necessary for it to run. A new exception class can be created specifically to be thrown by plugins and handled gracefully by Dandelion.
The text was updated successfully, but these errors were encountered:
Create a plugin system that would allow third-party extensions to interface with Dandelion. This would require several things. The first being a hook system. Proposed main application hooks: before run, after run, before route, after route, before api dispatch, after api dispatch. Each API module, and controllers can also have their own hooks if desired. This can be a gradual roll out. The data given to the hook's callbacks would differ depending on which hook is being called. A base plugin class could be created that would provide basic necessities such as database access and configuration access. This would allow plugins to have their own custom configurations as part of the Dandelion main config file. Each hook can have multiple callbacks and will called in the order they were registered. The main configuration would have a new property called plugins which would be an array of plugin names. They would be loaded in the order of this array. The called file would be something like [dir-to-plugins]/{plugin-slug}/main.php. This main.php file would be responsible for registering its hooks and including any files necessary for it to run. A new exception class can be created specifically to be thrown by plugins and handled gracefully by Dandelion.
The text was updated successfully, but these errors were encountered: