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 }