/**
  * main class constructor
  * @param $name demo folder
  */
 public function __construct($name = '')
 {
     $this->importer = HW_Import::get_instance();
     //get wxr parser
     if (empty(self::$data)) {
         $list_demos = HW_File_Directory::list_folders(HW_THEME_OPTIONS_SAMPLE_DATA);
         foreach ($list_demos as $path => $demo) {
             $this->add_demo($path, $demo);
         }
     }
     if (!isset(self::$data[$name])) {
         return null;
     }
 }
 /**
  * do import data from command
  * @param $cmd_name
  */
 public function do_import($cmd_name)
 {
     if (empty($this->xml)) {
         return;
     }
     $import = HW_Import::get_instance();
     if (isset($this->xml->{$cmd_name})) {
         $import->import_file($this->xml->{$cmd_name});
     }
 }
 /**
  * create instance of this class
  * @param $module_exporter
  * @return HW_Import
  */
 public static function get_instance($module_exporter = null)
 {
     if (empty(self::$instance)) {
         self::$instance = new self($module_exporter);
     }
     return self::$instance;
 }