Consistent naming and parameters in API and FrontController events #9033
Labels
c: Platform
For Matomo platform changes that aren't impacting any of our APIs but improve the core itself.
wontfix
If you can reproduce this issue, please reopen the issue or create a new one describing it.
Milestone
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 namedmodule
andaction
.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 ofmodule
we could also useplugin
maybe but not sure.plugin
might be more clear for 3rd party developers what is meantThis is something for 3.0 or 4.0
The text was updated successfully, but these errors were encountered: