Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin system #16

Open
lfkeitel opened this issue Feb 26, 2015 · 0 comments
Open

Plugin system #16

lfkeitel opened this issue Feb 26, 2015 · 0 comments

Comments

@lfkeitel
Copy link
Member

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.

@lfkeitel lfkeitel modified the milestone: Dandelion v6.1 Mar 1, 2015
@lfkeitel lfkeitel modified the milestone: Dandelion v6.1.0 Jun 26, 2015
@lfkeitel lfkeitel added this to the Version 7.0.0 milestone Nov 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant