Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
4892d66a
Commit
4892d66a
authored
Jan 04, 2016
by
Carsten Rose
Browse files
Sanatize.php: moved to directory qfq/helper
parent
455a6e86
Changes
5
Hide whitespace changes
Inline
Side-by-side
qfq/Constants.php
View file @
4892d66a
...
...
@@ -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
qfq/Form.php
View file @
4892d66a
...
...
@@ -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
()
{
...
...
qfq/helper/KeyValueStringParser.php
View file @
4892d66a
...
...
@@ -8,7 +8,7 @@
* $Id$
*/
namespace
qfq
;
namespace
qfq
\helper
;
use
qfq
;
use
qfq\exceptions\UserException
;
...
...
qfq/Sanatize.php
→
qfq/
helper/
Sanatize.php
View file @
4892d66a
...
...
@@ -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
{
...
...
tests/phpunit/SanatizeTest.php
View file @
4892d66a
...
...
@@ -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'
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment