Commit 4892d66a authored by Carsten  Rose's avatar Carsten Rose
Browse files

Sanatize.php: moved to directory qfq/helper

parent 455a6e86
......@@ -16,10 +16,10 @@ const SANATIZE_DEFAULT = SANATIZE_DIGIT;
// QFQ Error Codes
const ERROR_UNKNOW_SANATIZE_CLASS = 1001;
const ERROR_STORE_NOT_IMPLEMENTED = 1002;
const ERROR_UNKNOWN_STORE = 1003;
// 1002
// 1003;
const ERROR_VALUE_ALREADY_CODPIED = 1004;
const ERROR_SETVARARRAY_NOT_IMPLEMENTED = 1005;
// 1005
const ERROR_MISSING_FORM_NAME = 1006;
const ERROR_IN_SQL_STATEMENT = 1007;
const ERROR_READ_FILE = 1008;
......@@ -49,4 +49,12 @@ const CLIENT_PAGE_LANGUAGE = 'pageLanguage';
// T3 Bodytext Keywords
const T3_BODYTEXT_FORM = CLIENT_FORM;
const T3_BODYTEXT_DEBUG_LOAD = 'debugLoad';
const T3_BODYTEXT_DEBUG_SAVE = 'debugSave';
\ No newline at end of file
const T3_BODYTEXT_DEBUG_SAVE = 'debugSave';
// System
const SYSTEM_DBUSER = 'DBUSER';
const SYSTEM_DBSERVER = 'DBSERVER';
const SYSTEM_DBPW = 'DBPW';
const SYSTEM_DB = 'DB';
const SYSTEM_TESTDB = 'TESTDB';
const SYSTEM_SESSIONNAME = 'SESSIONNAME';
\ No newline at end of file
......@@ -28,7 +28,7 @@ class Form {
/*
*
*/
public function __construct() {
public function __construct($bodytext = '') {
/*
* TODO:
......@@ -42,7 +42,7 @@ class Form {
* doActions 'After'
*/
$this->store = \qfq\store\Store::getInstance();
$this->store = \qfq\store\Store::getInstance($bodytext);
}
......@@ -50,22 +50,15 @@ class Form {
*
*/
public function process($bodytext) {
$this->parseBodyText($bodytext);
public function process() {
$this->loadFormDefinition();
//
// $val = $this->store->getVar('key01',STORE_CLIENT);
return "Hello World from class Form";
}
private function parseBodyText($bodytext) {
$keyValue = new KeyValueStringParser("=", "\n");
$this->store->setVarArray($keyValue->parse($bodytext), STORE_T3_BODYTEXT);
}
private function loadFormDefinition() {
......
......@@ -8,7 +8,7 @@
* $Id$
*/
namespace qfq;
namespace qfq\helper;
use qfq;
use qfq\exceptions\UserException;
......
......@@ -11,7 +11,7 @@ namespace qfq;
use qfq;
use qfq\exceptions\CodeException;
require_once(__DIR__ . '/../qfq/Constants.php');
require_once(__DIR__ . '/../../qfq/Constants.php');
class Sanatize {
......
......@@ -9,10 +9,9 @@
namespace qfq;
//use qfq\Sanatize;
use qfq\exceptions\CodeException;
//use qfq\exceptions\CodeException;
require_once(__DIR__ . '/../../qfq/Sanatize.php');
require_once(__DIR__ . '/../../qfq/helper/Sanatize.php');
require_once(__DIR__ . '/../../qfq/exceptions/CodeException.php');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment