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

3.x-dev default return mode #82

Open
clevelasosu opened this issue Sep 20, 2021 · 0 comments
Open

3.x-dev default return mode #82

clevelasosu opened this issue Sep 20, 2021 · 0 comments

Comments

@clevelasosu
Copy link

In 3.x dev, the default is to return an associative array. That breaks all past code. I appreciate having the option, but can it default to an object to not break old code? Or maybe an API level option to set the default return mode?

$api->defaultReturnMode(ZABBIX::RET_ASSOC)

Then in each method, instead of $assoc = true, use $mode=null and use those same variables for overriding the default return mode?

$api->hostGet([],null,ZABBIX::RET_ASSOC);

With this setup, you could change the default to assoc, but allow us to change the default to keep old code working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant