public function renameField($old, $new = null) { if (is_array($old)) { $update = array('$rename' => $old); } else { $update = array('$rename' => array($old => $new)); } return $this->performUpdate($update); }