Ejemplo n.º 1
0
 public function countAlbumPhotosForList(array $albumIdList)
 {
     if (!$albumIdList) {
         return array();
     }
     $counters = $this->photoDao->countAlbumPhotosForList($albumIdList);
     $counterList = array();
     if ($counters) {
         foreach ($counters as $count) {
             $counterList[$count['albumId']] = $count['photoCount'];
         }
     }
     $result = array();
     foreach ($albumIdList as $albumId) {
         $result[$albumId] = !empty($counterList[$albumId]) ? $counterList[$albumId] : null;
     }
     return $result;
 }