command_classes.php
public function setOrdering($order)
    {
        if (is_array($order)) {
            $order = implode('', $order);
        }
        $this->setParam('ordering', $order);
    }
public function setOrdering($order)
    {
        if (is_array($order)) {
            $order = implode('', $order);
        }
        $this->setParam('ordering', $order);
    }
public function setOrdering ( $ order ) { if ( is_array ( $ order ) ) { $ order = implode ( '' , $ order ) ; } $ this -> setParam ( 'ordering' , $ order ) ; }
Defines the order in which results should be returned.
@param string|array $order either a single sorting string or an array of those. Could be conveniently generated with ordering macros,
e.g. $q->setOrdering(array(CPS_NumericOrdering('user_count', 'desc'), CPS_RelevanceOrdering())) will sort the documents in descending order
according to the user_count, and if user_count is equal will sort them by relevance.
@see CPS_RelevanceOrdering, CPS_NumericOrdering, CPS_LatLonDistanceOrdering, CPS_PlainDistanceOrdering
Defines the order in which results should be returned .