/**
  * 
  * get bullets set from some dir
  */
 private static function getBulletSetFromDir($dir)
 {
     $pathSet = GlobalsUniteRev::$pathAssetsBullets . $dir . "/";
     if (is_dir($pathSet) == false) {
         UniteFunctionsRev::throwError("The bullet directory: {$dir} not found!");
     }
     $urlSet = GlobalsUniteRev::$urlAssetsBullets . $dir . "/";
     //set paths
     $bulletNormal = "bullet_normal.png";
     $bulletActive = "bullet_active.png";
     $bgLeft = "bg_left.png";
     $bgRepeat = "bg_repeat.png";
     $bgRight = "bg_right.png";
     $preview = "preview.png";
     $options = "options.ini";
     //validate required paths:
     if (file_exists($pathSet . $bulletNormal) == false) {
         UniteFunctionsRev::throwError("{$bulletNormal} not found in bullets set: {$dir}");
     }
     if (file_exists($pathSet . $bulletActive) == false) {
         UniteFunctionsRev::throwError("{$bulletActive} not found in bullets set: {$dir}");
     }
     //validate required paths:
     if (file_exists($pathSet . $preview) == false) {
         UniteFunctionsRev::throwError("{$preview} not found in bullets set: {$dir}");
     }
     //set data array
     $set = array();
     $set["name"] = $dir;
     $set["url_normal"] = $urlSet . $bulletNormal;
     $set["url_active"] = $urlSet . $bulletActive;
     $set["url_preview"] = $urlSet . $preview;
     //set bg
     $set["url_bgleft"] = "";
     $set["url_bgright"] = "";
     $set["url_bgrepeat"] = "";
     $set["is_bg"] = false;
     if (file_exists($pathSet . $bgLeft) && file_exists($pathSet . $bgRight) && file_exists($pathSet . $bgRepeat)) {
         $set["is_bg"] = true;
         $set["url_bgleft"] = $urlSet . $bgLeft;
         $set["url_bgright"] = $urlSet . $bgRight;
         $set["url_bgrepeat"] = $urlSet . $bgRepeat;
     }
     //set options
     $set["options"] = array();
     if (file_exists($pathSet . $options)) {
         $content = file_get_contents($pathSet . $options);
         $arrOptions = UniteFunctionsRev::parseSettingsFile($content);
         $set["options"] = $arrOptions;
     }
     return $set;
 }