src/Aindong/Pluggables/Pluggables.php
protected function arrayOrderBy()
    {
        $arguments = func_get_args();
        $data = array_shift($arguments);
        foreach ($arguments as $argument => $field) {
            if (is_string($field)) {
                $temp = [];
                foreach ($data as $key => $row) {
                    $temp[$key] = $row[$field];
                }
                $arguments[$argument] = $temp;
            }
        }
        $arguments[] = &$data;
        call_user_func_array('array_multisort', $arguments);

        return array_pop($arguments);
    }
protected function arrayOrderBy()
    {
        $arguments = func_get_args();
        $data = array_shift($arguments);
        foreach ($arguments as $argument => $field) {
            if (is_string($field)) {
                $temp = [];
                foreach ($data as $key => $row) {
                    $temp[$key] = $row[$field];
                }
                $arguments[$argument] = $temp;
            }
        }
        $arguments[] = &$data;
        call_user_func_array('array_multisort', $arguments);

        return array_pop($arguments);
    }
protected function arrayOrderBy ( ) { $ arguments = func_get_args ( ) ; $ data = array_shift ( $ arguments ) ; foreach ( $ arguments as $ argument => $ field ) { if ( is_string ( $ field ) ) { $ temp = [ ] ; foreach ( $ data as $ key => $ row ) { $ temp [ $ key ] = $ row [ $ field ] ; } $ arguments [ $ argument ] = $ temp ; } } $ arguments [ ] = & $ data ; call_user_func_array ( 'array_multisort' , $ arguments ) ; return array_pop ( $ arguments ) ; }
Helper method to order multiple values easily.

@return array
Helper method to order multiple values easily .