Implemented sort processor.

This commit is contained in:
Alex Tselegidis 2016-07-10 10:37:11 +02:00
parent 520b8d75e0
commit f99d729830
1 changed files with 6 additions and 5 deletions

View File

@ -53,21 +53,22 @@ class Sort implements ProcessorsInterface {
}
$arguments = [
$response,
$sortDirection1,
$sortOrder1
&$sortOrder1,
&$sortDirection1
];
if ($sortDirection2) {
$arguments[] = $sortDirection2;
$arguments[] = $sortOrder2;
$arguments[] = $sortDirection2;
}
if ($sortDirection3) {
$arguments[] = $sortDirection3;
$arguments[] = $sortOrder3;
$arguments[] = $sortDirection3;
}
$arguments[] = &$response;
call_user_func_array('array_multisort', $arguments);
}
}