Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistent naming and parameters in API and FrontController events #9033

Closed
tsteur opened this issue Oct 16, 2015 · 1 comment
Closed

Consistent naming and parameters in API and FrontController events #9033

tsteur opened this issue Oct 16, 2015 · 1 comment
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

Comments

@tsteur
Copy link
Member

tsteur commented Oct 16, 2015

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 tsteur added the c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. label Oct 16, 2015
@tsteur tsteur changed the title Consist naming in API and FrontController events Consist naming and parameters in API and FrontController events Oct 16, 2015
@mattab mattab added this to the 3.0.0 milestone Nov 26, 2015
@mattab mattab changed the title Consist naming and parameters in API and FrontController events Consistent naming and parameters in API and FrontController events Feb 8, 2016
@tsteur
Copy link
Member Author

tsteur commented Feb 11, 2020

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.

@tsteur tsteur closed this as completed Feb 11, 2020
@tsteur tsteur added the wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it. label Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

2 participants