[dev] Turba API searchClients()
Luis Felipe Marzagao
lfbm.andamentos at gmail.com
Mon Sep 26 02:03:33 UTC 2011
Hello:
I just noticed that:
$registry->contacts->searchClients(array(null));
or
$registry->contacts->searchClients(array(''));
Returns a nested array with *all* clients, with this kind of array set:
Array
(
[] => Array
(
[0] => Array
(
[__key] => ....
...
[name] => John Doe
....
)
[1] => Array
(
[__key] => ....
...
[name] => Jane Smith
....
)
...
)
)
The key of the first array is empty "[]", as this was supposed to hold
the filter search criteria, which, in this example, was not supplied
with the searchClients method.
So:
1 - Is this the recommended way of retrieving all clients of returning
all clients or is it just an accident?
2 - If it is the recommended way, shouldn´t the first key be set to
something like 'all-clients', instead of an empty key, just to make it
easier to read or easier to manipulate?
Thanks a lot
Luis Felipe
More information about the dev
mailing list