original_string: 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);
          }
      }
code: 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);
          }
      }
code_tokens: 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 ) ; } }
docstring: Apply sorting on particular field.
  
  @param Iterator    $i
  @param string      $field
  @param string|bool $desc
docstring_tokens: Apply sorting on particular field .