From f99d72983065328113354bafc475e3fc1c8e3e11 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Sun, 10 Jul 2016 10:37:11 +0200 Subject: [PATCH] Implemented sort processor. --- src/engine/Api/V1/Processors/Sort.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/engine/Api/V1/Processors/Sort.php b/src/engine/Api/V1/Processors/Sort.php index 2bc1a08a..1f1d82ca 100644 --- a/src/engine/Api/V1/Processors/Sort.php +++ b/src/engine/Api/V1/Processors/Sort.php @@ -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); } }