/**
  * @return Git_Mirror_Mirror
  * @throws Git_Mirror_MirrorNotFoundException
  */
 public function fetch($id)
 {
     $row = $this->dao->fetch($id);
     if (!$row) {
         throw new Git_Mirror_MirrorNotFoundException();
     }
     $owner = $this->getMirrorOwner($row['id']);
     return $this->getInstanceFromRow($owner, $row);
 }
 public function getListOfMirrorIdsPerRepositoryForProject(Project $project)
 {
     $repositories = array();
     foreach ($this->dao->fetchAllRepositoryMirroredInProject($project->getId()) as $row) {
         if (!isset($repositories[$row['repository_id']])) {
             $repositories[$row['repository_id']] = array();
         }
         $repositories[$row['repository_id']][] = $row['mirror_id'];
     }
     return $repositories;
 }