예제 #1
0
파일: YagDriver.php 프로젝트: kabarakh/yag
 protected function getAlbums(PathInfo $pathInfo)
 {
     $galleryPath = '/' . implode('/', array($pathInfo->getPid(), $pathInfo->getGalleryUId()));
     if (!array_key_exists($galleryPath, $this->yagDirectoryCache)) {
         $this->yagDirectoryCache[$galleryPath] = array();
         $albums = $this->albumRepository->findByGallery($pathInfo->getGalleryUId());
         foreach ($albums as $album) {
             $this->yagDirectoryCache[$galleryPath][$album->getUid()] = $this->buildAlbumObjectInfo($pathInfo, $album);
             $this->yagDirectoryPathCache[$galleryPath . '/' . $album->getUid()] = true;
         }
     }
     return $this->yagDirectoryCache[$galleryPath];
 }