function services_admin_browse_test_unserialize_args in Services 6
Same name and namespace in other branches
- 5 services_admin_browse.inc \services_admin_browse_test_unserialize_args()
- 6.2 services_admin_browse.inc \services_admin_browse_test_unserialize_args()
- 7 services_admin_browse.inc \services_admin_browse_test_unserialize_args()
1 call to services_admin_browse_test_unserialize_args()
File
- ./
services_admin_browse.inc, line 191 - @author Services Dev Team
Code
function services_admin_browse_test_unserialize_args($values) {
$method = services_method_get(arg(4));
$noskip = FALSE;
// Convert args
for ($c = count($method['#args']) - 1; $c >= 0; $c--) {
$arg = $method['#args'][$c];
$value = $values[$c];
// Remove empty values from end of array
// Once we find a value, we can no longer skip
if (!is_numeric($value) and empty($value) and !$noskip) {
continue;
}
$noskip = TRUE;
switch ($arg['#type']) {
case 'array':
if (empty($value)) {
$return[$c] = NULL;
}
else {
$return[$c] = explode(',', $value);
}
break;
default:
$return[$c] = $value;
}
}
if ($return) {
ksort($return);
}
return $return;
}