public function __construct(EntityManager $entityManager, AlbumCoverProvider $albumCoverProvider, string $songsDirectory)
 {
     $this->entityManager = $entityManager;
     $this->songsDirectory = $songsDirectory;
     $this->albumCoverProvider = $albumCoverProvider;
     $this->songRepository = $entityManager->getRepository(Song::getClassName());
     $this->genresRepository = $entityManager->getRepository(Genre::getClassName());
     $this->addFunctions();
     $this->genreCache = [];
     $this->hashCache = [];
 }
 /**
  * @return string[]
  */
 public function getAllGenreNames() : array
 {
     $qb = $this->entityManager->createQueryBuilder();
     $qb->select('g.name')->from(Genre::getClassName(), 'g');
     return array_column($qb->getQuery()->getScalarResult(), 'name');
 }