public function group($table) { if (is_object($table)) { if (is_object($this->group)) { return $this->group->result($table); } return $this->group; } if (is_object($this->group)) { $this->group->string($table); } else { $this->group = $table; } }