add xml response, add doc and refactor
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user