public function findPhotosInAlbum($albumId, array $photos) { $self = $this; return array_map(function ($photo) use($self) { $photo['url'] = $self->getPhotoUrlByType($photo['id'], PHOTO_BOL_PhotoService::TYPE_PREVIEW, $photo['hash'], !empty($photo['dimension']) ? $photo['dimension'] : false); return $photo; }, $this->photoDao->findPhotosInAlbum($albumId, $photos)); }