Controller_Data_Mongo::setOrder PHP Method

setOrder() public method

public setOrder ( $model, $field, $desc = false )
    public function setOrder($model, $field, $desc = false)
    {
        $this->_set($model, 'order', array($field => $desc ? -1 : 1));
        // TODO: allow setting order multiple times
        // TODO: extend syntax to be compatible with SQL_Model
    }