You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
robocoder opened this issue
Feb 13, 2012
· 1 comment
Labels
TaskIndicates an issue is neither a feature nor a bug and it's purely a "technical" change.wontfixIf you can reproduce this issue, please reopen the issue or create a new one describing it.
It is a nice idea and concept, but i'm glad you put it in "Feature requests". I think the current API is quite easy to use.
when it gets tricky, we see developers fall back to using Piwik_Common::getRequestVar()
Never should Piwik_Common::getRequestVar() be used in an API, or it is a design fault. If you see it in core we should fix it for sure.
Technically the API proxy does the job of requesting the value and passing it to the API functions. Never it should directly call getRequestVar or it means the API will not work well in all cases.
it can't accommodate adding/removing/renaming a parameter without breaking backward compatibility
Current design accomodates this, because the parameter are not ordered when using new Piwik_API_Request() or when using the REST http API.
Ordering only matters when using directly the Php call ::getInstance()->method() but this method is only used for speed by the core algorithms, which can be easily changed if the API signature would need to change.
TaskIndicates an issue is neither a feature nor a bug and it's purely a "technical" change.wontfixIf you can reproduce this issue, please reopen the issue or create a new one describing it.
This is a planning/discussion ticket:
Background:
Example from Actions/API.php:
Gaps:
Proposal:
Phase 1:
Phase 2 ("secure by default", i.e., break 3rd party plugins that haven't been updated):
Possibilities:
Applies to class or method:
Applies to class or method:
Applies to all methods of a class:
For methods, either use the @param annotation above, or apply to the preceding @param for a method using:
References:
Keywords: interesting
The text was updated successfully, but these errors were encountered: