public function order($table, $method = null) { if (is_object($table)) { if (is_object($this->order)) { return $this->order->result($table); } return $this->order; } $this->order->method($method); $this->order->field($table); }