/**
  * @return bool
  * @throws Git_Mirror_MirrorNoChangesException
  * @throws Git_Mirror_MirrorNotFoundException
  * @throws Git_Mirror_MissingDataException
  */
 public function update($id, $url, $hostname, $ssh_key, $name)
 {
     $mirror = $this->fetch($id);
     if ($url == $mirror->url && $hostname == $mirror->hostname && $ssh_key == $mirror->ssh_key && $name == $mirror->name) {
         throw new Git_Mirror_MirrorNoChangesException();
     }
     $this->checkThatHostnameIsValidOnUpdate($id, $hostname);
     if (!$url || !$ssh_key) {
         throw new Git_Mirror_MissingDataException();
     }
     if ($ssh_key != $mirror->ssh_key) {
         $this->user_manager->updateUserSSHKeys($mirror->owner, array($ssh_key));
     }
     $this->git_system_event_manager->queueUpdateMirror($id, $mirror->hostname);
     return $this->dao->updateMirror($id, $url, $hostname, $name);
 }