diff options
Diffstat (limited to 'docs/PLUGINS')
-rw-r--r-- | docs/PLUGINS | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/docs/PLUGINS b/docs/PLUGINS new file mode 100644 index 00000000..910a9e1a --- /dev/null +++ b/docs/PLUGINS @@ -0,0 +1,25 @@ +Plugins are placed in modules/plugins; the name of the file must be +<Name>.plugin.php, e.g. Dummy.plugin.php. The file must declare a +corresponding class and the name of the class must be prefixed with +Ampache, e.g. AmpacheDummy. + +The following public variables must be declared: + name (string) + description (string) + version (int) - This plugin's version + min_ampache (int) - Minimum Ampache DB version required + max_ampache (int) - Maximum Ampache DB version supported + +The following public methods must be implemented: + install + uninstall + load + +The following public methods may be implemented: + upgrade + +Finally, for the plugin to actually be useful one or more of the following hooks +should be implemented as a public method: + save_rating(Rating $rating, int $new_value) + save_songplay(Song $song) + |