public function __construct($config = NULL) {
parent::__construct($config);
if(!function_exists('simplexml_load_file')) throw new Exception("Your server isn't suppost this class.");
}
public function getXMLFromFolder($dir) {
if(!is_dir($dir)) return false;
$dir = rtrim(str_replace("\\", "/", $dir), '/').'/';
$dp = @opendir($dir);
if(!$dp) throw new Exception("Can not open folder");
while(($f = readdir($dp)) !== false) {
if($f != '.' && $f != '..') {
if(!$this->setXMLFiles($dir.$f)) throw new Exception("Error:Files are not xml file or files are not exists.");
}
}
closedir($dp);
return true;
}