public function getAlbumsList()
 {
     $directoryPath = $this->getAlbumsFolderLocation();
     $albums_list = array();
     $list = null;
     if (File::exists($directoryPath)) {
         $list = File::directories($directoryPath);
     }
     if ($list != null) {
         foreach ($list as $album) {
             $locationExplode = explode("/", $album);
             $folderName = end($locationExplode);
             if (!StringUtils::getInstance()->startsWith($folderName, "hidden_")) {
                 if ($this->isAlbumList($album)) {
                     $titleFilePath = $album . DIRECTORY_SEPARATOR . "title.txt";
                     if (File::exists($titleFilePath)) {
                         array_push($albums_list, $album);
                     }
                 } else {
                     array_push($albums_list, $album);
                 }
             }
         }
     }
     return $albums_list;
 }
 public function getAlbumPhotoList($albumLocation)
 {
     $photos = array();
     if (File::exists($albumLocation)) {
         $files = File::files($albumLocation);
         foreach ($files as $p) {
             $fhandle = finfo_open(FILEINFO_MIME);
             $mime_type = finfo_file($fhandle, $p);
             if (StringUtils::getInstance()->startsWith($mime_type, "image")) {
                 array_push($photos, $p);
             }
         }
     }
     return $photos;
 }