lib/Sirel/Selections.php
function reverseOrder(array $attributes = null)
    {
        if ($attributes !== null) {
            $attributes = array_map('strval', $attributes);

            $orders = array_filter($this->getNodes()->orders, function($o) use ($attributes) {
                $expr = $o->getExpression();
                $name = (string) $expr;

                return in_array($name, $attributes);
            });
        } else {
            $orders = $this->getNodes()->orders;
        }

        foreach ($orders as $order) {
            $order->reverse();
        }

        return $this;
    }
function reverseOrder(array $attributes = null)
    {
        if ($attributes !== null) {
            $attributes = array_map('strval', $attributes);

            $orders = array_filter($this->getNodes()->orders, function($o) use ($attributes) {
                $expr = $o->getExpression();
                $name = (string) $expr;

                return in_array($name, $attributes);
            });
        } else {
            $orders = $this->getNodes()->orders;
        }

        foreach ($orders as $order) {
            $order->reverse();
        }

        return $this;
    }
function reverseOrder ( array $ attributes = null ) { if ( $ attributes !== null ) { $ attributes = array_map ( 'strval' , $ attributes ) ; $ orders = array_filter ( $ this -> getNodes ( ) -> orders , function ( $ o ) use ( $ attributes ) { $ expr = $ o -> getExpression ( ) ; $ name = ( string ) $ expr ; return in_array ( $ name , $ attributes ) ; } ) ; } else { $ orders = $ this -> getNodes ( ) -> orders ; } foreach ( $ orders as $ order ) { $ order -> reverse ( ) ; } return $ this ; }
Reverses the order of all order clauses

@param array $attributes Optional list of attributes which should
be reversed
@return SelectManager
Reverses the order of all order clauses