add xml response, add doc and refactor

This commit is contained in:
stubbfel
2013-06-25 13:32:00 +02:00
parent 8fb78ca082
commit 858758ccc9
8 changed files with 374 additions and 55 deletions

View File

@@ -42,11 +42,22 @@ abstract class SqlManager {
*/
private $link;
/**
* String for a and operrator
* @var string
*/
protected $andTerm = " and ";
/**
* String for quotes in a query
* @var string
*/
protected $quoteTerm = "\"";
/**
* Default-Constructor
*/
public function __construct() {
$this->serverAddress = \config\DBConfig::$sqlServer;
$this->dbName = \config\DBConfig::$sqlDBName;
$this->userName = \config\DBConfig::$sqlDBUser;
@@ -108,6 +119,11 @@ abstract class SqlManager {
return $result;
}
/**
* Method if the string is not a empty String (not only spaces and controlls)
* @param string $string
* @return boolean
*/
protected function validString($string) {
if (!ctype_space($string) && !ctype_cntrl($string)) {
return TRUE;
@@ -115,14 +131,6 @@ abstract class SqlManager {
return FALSE;
}
protected function startsWith($haystack, $needle) {
return !strncmp($haystack, $needle, strlen($needle));
}
protected function endsWith($haystack, $needle) {
return (substr($haystack, -strlen($needle)) === $needle);
}
}
?>