diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-09-09 11:39:09 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2015-09-09 11:39:09 +0300 |
commit | 65353d7bac8a90bf05545c0ecd693d81b684f9e2 (patch) | |
tree | e177dff41f50f1b1f2541c386ecec43bdb933121 /core/Plugin.php | |
parent | c983e4fce1958cd6e42cec69f5a5056617353788 (diff) |
refs #8565 #8503 #8567 refactored/removed some code to not use deprecated APIs / events for 3.0
Diffstat (limited to 'core/Plugin.php')
-rw-r--r-- | core/Plugin.php | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/core/Plugin.php b/core/Plugin.php index 560e7581b1..ff938a659f 100644 --- a/core/Plugin.php +++ b/core/Plugin.php @@ -56,7 +56,7 @@ require_once PIWIK_INCLUDE_PATH . '/core/Plugin/MetadataLoader.php'; * * class MyPlugin extends Plugin * { - * public function getListHooksRegistered() + * public function registerEvents() * { * return array( * 'API.getReportMetadata' => 'getReportMetadata', @@ -192,7 +192,7 @@ class Plugin } /** - * Returns a list of hooks with associated event observers. + * Returns a list of events with associated event observers. * * Derived classes should use this method to associate callbacks with events. * @@ -209,13 +209,23 @@ class Plugin * 'before' => true // execute before callbacks w/o ordering * ) * ) + * @since 2.15.0 */ - public function getListHooksRegistered() + public function registerEvents() { return array(); } /** + * @deprecated since 2.15.0 use {@link registerEvents()} instead. + * @return array + */ + public function getListHooksRegistered() + { + return $this->registerEvents(); + } + + /** * This method is executed after a plugin is loaded and translations are registered. * Useful for initialization code that uses translated strings. */ |