public function applySorting($i, $field, $desc)
    {
        if (!$field) {
            return;
        }
        if ($i instanceof DB_dsql) {
            $i->order($field, $desc);
        } elseif ($i instanceof \atk4\data\Model) {
            $i->setOrder($field, $desc);
        } elseif ($i instanceof SQL_Model) {
            $i->setOrder($field, $desc);
        } elseif ($i instanceof Model) {
            $i->setOrder($field, $desc);
        }
    }
public function applySorting($i, $field, $desc)
    {
        if (!$field) {
            return;
        }
        if ($i instanceof DB_dsql) {
            $i->order($field, $desc);
        } elseif ($i instanceof \atk4\data\Model) {
            $i->setOrder($field, $desc);
        } elseif ($i instanceof SQL_Model) {
            $i->setOrder($field, $desc);
        } elseif ($i instanceof Model) {
            $i->setOrder($field, $desc);
        }
    }
public function applySorting ( $ i , $ field , $ desc ) { if ( ! $ field ) { return ; } if ( $ i instanceof DB_dsql ) { $ i -> order ( $ field , $ desc ) ; } elseif ( $ i instanceof \ atk4 \ data \ Model ) { $ i -> setOrder ( $ field , $ desc ) ; } elseif ( $ i instanceof SQL_Model ) { $ i -> setOrder ( $ field , $ desc ) ; } elseif ( $ i instanceof Model ) { $ i -> setOrder ( $ field , $ desc ) ; } }
Apply sorting on particular field.

@param Iterator    $i
@param string      $field
@param string|bool $desc
Apply sorting on particular field .