Revisit LocationProvider API and make it public #7240
Labels
c: Platform
For Matomo platform changes that aren't impacting any of our APIs but improve the core itself.
Enhancement
For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Milestone
It is possible to write a custom LocationProvider instead of eg GeoIP, ServerBased, Pecl, ... provider. Piwik will then use this LocationProvider to detect the location of the user. On developer.piwik.org it is mentioned that this is possible but only in a few lines.
At some point we should revisit this API as it is not really officially supported to do that (missing @api and therefore not public API). We should make the API simple in case it is not yet the case. For example why is there
isAvailable()
andisWorking()
, is it really needed? Instead ofgetInfo()
returning anarray
we could havegetId()
,getDescription()
,getOrder()
,getTitle()
. It otherwise doesn't look to bad and seems to be not a lot of work and we maybe do not even have to break anything.We also need to make sure it is not needed to do anything in core when adding a new location provider. Afterwards we'll make the API public and write a guide + blog post for it.
The text was updated successfully, but these errors were encountered: