rhymix/test-phpUnit/Helper.class.php
2011-06-30 15:36:03 +00:00

20 lines
No EOL
537 B
PHP

<?php
class Helper {
static function cleanQuery($query){
$query = trim(preg_replace('/\s+/', ' ',$query));
$query = str_replace(" , ", ', ', $query);
$query = str_replace("( ", '(', $query);
$query = str_replace(" )", ')', $query);
$query = strtolower($query);
return $query;
}
static function getXmlObject($xml_file){
$xmlParser = XmlQueryParser::getInstance();
return $xmlParser->getXmlFileContent($xml_file);
}
}
?>