setOrder() public method

Set order for model records. Multiple calls.
public setOrder ( mixed $field, boolean | null $desc = null )
$field mixed
$desc boolean | null
Exemplo n.º 1
0
 /**
  * If first argument is array, then second argument should not be used.
  *
  * @expectedException Exception
  */
 public function testException1()
 {
     $m = new Model();
     $m->addFields(['name', 'salary']);
     $m->setOrder(['name', 'salary'], 'desc');
 }