@tsteur opened this Issue on October 16th 2015 Member

eg we have on event

Piwik::postEvent('API.Request.dispatch', array(&$finalParameters, $pluginName, $methodName));

and another event

Piwik::postEvent('API.Request.dispatch.end', $endHookParams).

I'd expect to have similar parameters in API.Request.dispatch.end ($pluginName, $methodName as parameter).

Also the naming is inconsistent. Sometimes we say $pluginName and $methodName, in ....end event it's named module and action.

Same applies for API.%s.%s* events.

The events in FrontController are even more inconsistent. Eg we have

Piwik::postEvent(sprintf('Controller.%s.%s.end', $module, $action), array(&$result, $parameters));
and Piwik::postEvent('Request.dispatch.end', array(&$result, $module, $action, $parameters));

Both .end events should post same parameters. In general instead of module we could also use plugin maybe but not sure. plugin might be more clear for 3rd party developers what is meant

This is something for 3.0 or 4.0

@tsteur commented on February 11th 2020 Member

Actually closing this issue as I realise it's actually all good. It could be slightly tweaked eg the API.Request.dispatch.end event to post pluginName and methodName directly, but it's not really worth making any change there for now.

This Issue was closed on February 11th 2020
Powered by GitHub Issue Mirror