Skip to content

Commit 65353d7

Browse files
committedSep 9, 2015
refs #8565 #8503 #8567 refactored/removed some code to not use deprecated APIs / events for 3.0
1 parent c983e4f commit 65353d7

File tree

61 files changed

+132
-115
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+132
-115
lines changed
 

‎CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ This is a changelog for Piwik platform developers. All changes for our HTTP API'
1010

1111
### Deprecations
1212
* The API method `SitesManager.getSitesIdWithVisits` has been deprecated and will be removed in Piwik 3.0
13+
* The API method `\Piwik\Plugin::getListHooksRegistered()` has been deprecated and will be removed in Piwik 3.0. Use `\Piwik\Plugin::registerEvents()` instead.
1314
* The following events have been deprecated and will be removed in Piwik 3.0. Use [dimensions](http://developer.piwik.org/guides/dimensions) instead.
1415
* `Tracker.existingVisitInformation`
1516
* `Tracker.getVisitFieldsToPersist`
@@ -19,6 +20,7 @@ This is a changelog for Piwik platform developers. All changes for our HTTP API'
1920
* `Tracker.recordEcommerceGoal`
2021
* `Tracker.recordStandardGoals`
2122

23+
2224
### New APIs
2325

2426
* The JavaScript Tracker `piwik.js` got a new method `logAllContentBlocksOnPage` to log all found content blocks within a page to the console. This is useful to debug / test content tracking. It can be triggered via `_paq.push(['logAllContentBlocksOnPage'])`

‎core/Plugin.php

+13-3
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
*
5757
* class MyPlugin extends Plugin
5858
* {
59-
* public function getListHooksRegistered()
59+
* public function registerEvents()
6060
* {
6161
* return array(
6262
* 'API.getReportMetadata' => 'getReportMetadata',
@@ -192,7 +192,7 @@ public function getInformation()
192192
}
193193

194194
/**
195-
* Returns a list of hooks with associated event observers.
195+
* Returns a list of events with associated event observers.
196196
*
197197
* Derived classes should use this method to associate callbacks with events.
198198
*
@@ -209,12 +209,22 @@ public function getInformation()
209209
* 'before' => true // execute before callbacks w/o ordering
210210
* )
211211
* )
212+
* @since 2.15.0
212213
*/
213-
public function getListHooksRegistered()
214+
public function registerEvents()
214215
{
215216
return array();
216217
}
217218

219+
/**
220+
* @deprecated since 2.15.0 use {@link registerEvents()} instead.
221+
* @return array
222+
*/
223+
public function getListHooksRegistered()
224+
{
225+
return $this->registerEvents();
226+
}
227+
218228
/**
219229
* This method is executed after a plugin is loaded and translations are registered.
220230
* Useful for initialization code that uses translated strings.

0 commit comments

Comments
 (0)