Commit 3eb33091 authored by Carsten  Rose's avatar Carsten Rose
Browse files

*: Namespaces of helper classes changed to qfq. New Class 'HelperFormElement'....

*: Namespaces of helper classes changed to qfq. New Class 'HelperFormElement'. HTML 'fieldset' implemented.
parent 9f4c5c05
...@@ -8,15 +8,17 @@ ...@@ -8,15 +8,17 @@
namespace qfq; namespace qfq;
use qfq; use qfq;
use qfq\store\Store; use qfq\Store;
use qfq\exceptions\UserException; use qfq\exceptions\UserException;
use qfq\helper\OnArray; use qfq\OnArray;
require_once(__DIR__ . '/../qfq/store/Store.php'); require_once(__DIR__ . '/../qfq/store/Store.php');
require_once(__DIR__ . '/../qfq/Constants.php'); require_once(__DIR__ . '/../qfq/Constants.php');
require_once(__DIR__ . '/../qfq/exceptions/DbException.php'); require_once(__DIR__ . '/../qfq/exceptions/DbException.php');
require_once(__DIR__ . '/../qfq/exceptions/UserException.php'); require_once(__DIR__ . '/../qfq/exceptions/UserException.php');
require_once(__DIR__ . '/../qfq/Database.php'); require_once(__DIR__ . '/../qfq/Database.php');
require_once(__DIR__ . '/../qfq/helper/HelperFormElement.php');
/** /**
* Class AbstractBuildForm * Class AbstractBuildForm
...@@ -41,6 +43,7 @@ abstract class AbstractBuildForm { ...@@ -41,6 +43,7 @@ abstract class AbstractBuildForm {
$this->evaluate = new Evaluate($this->store, $this->db); $this->evaluate = new Evaluate($this->store, $this->db);
// $sip = $this->store->getVar(CLIENT_SIP, STORE_CLIENT); // $sip = $this->store->getVar(CLIENT_SIP, STORE_CLIENT);
// render mode specific
$this->fillWrap(); $this->fillWrap();
$this->buildElementFunctionName = [ $this->buildElementFunctionName = [
...@@ -57,7 +60,8 @@ abstract class AbstractBuildForm { ...@@ -57,7 +60,8 @@ abstract class AbstractBuildForm {
'select' => 'Select', 'select' => 'Select',
'subrecord' => 'Subrecord', 'subrecord' => 'Subrecord',
'upload' => 'File', 'upload' => 'File',
'url' => 'Input' 'fieldset' => 'Fieldset',
'pill' => 'Pill'
]; ];
$this->inputCheckPattern = [ $this->inputCheckPattern = [
...@@ -112,7 +116,7 @@ abstract class AbstractBuildForm { ...@@ -112,7 +116,7 @@ abstract class AbstractBuildForm {
* @throws exceptions\CodeException * @throws exceptions\CodeException
* @throws exceptions\DbException * @throws exceptions\DbException
*/ */
public function elements($recordId, $filter = FORM_ELEMENTS_NATIVE) { public function elements($recordId, $filter = FORM_ELEMENTS_NATIVE, $feIdContainer=0) {
$html = ''; $html = '';
// get current data record // get current data record
...@@ -402,7 +406,7 @@ abstract class AbstractBuildForm { ...@@ -402,7 +406,7 @@ abstract class AbstractBuildForm {
} }
} elseif (isset($formElement['itemList'])) { } elseif (isset($formElement['itemList'])) {
$arr = qfq\helper\KeyValueStringParser::parse($formElement['itemList'], ':', ',', IF_VALUE_EMPTY_COPY_KEY); $arr = KeyValueStringParser::parse($formElement['itemList'], ':', ',', IF_VALUE_EMPTY_COPY_KEY);
$itemValue = array_values($arr); $itemValue = array_values($arr);
$itemKey = array_keys($arr); $itemKey = array_keys($arr);
} elseif ($fieldType === 'enum' || $fieldType === 'set') { } elseif ($fieldType === 'enum' || $fieldType === 'set') {
...@@ -719,7 +723,7 @@ abstract class AbstractBuildForm { ...@@ -719,7 +723,7 @@ abstract class AbstractBuildForm {
$control['width'][$col] = SUBRECORD_COLUMN_WIDTH; $control['width'][$col] = SUBRECORD_COLUMN_WIDTH;
// a) 'City@width=40', b) 'Status@icon', c) 'Mailto@width=80@nostrip' // a) 'City@width=40', b) 'Status@icon', c) 'Mailto@width=80@nostrip'
$arr = qfq\helper\KeyValueStringParser::parse($col, '=', '@', IF_VALUE_EMPTY_COPY_KEY); $arr = KeyValueStringParser::parse($col, '=', '@', IF_VALUE_EMPTY_COPY_KEY);
foreach ($arr as $attribute => $value) { foreach ($arr as $attribute => $value) {
switch ($attribute) { switch ($attribute) {
case 'width': case 'width':
...@@ -787,4 +791,67 @@ abstract class AbstractBuildForm { ...@@ -787,4 +791,67 @@ abstract class AbstractBuildForm {
return $value; return $value;
} }
/**
* @param array $formElement
* @param $htmlFormElementId
* @param $value
* @return mixed
*/
public function buildPill(array $formElement, $htmlFormElementId, $value) {
// save parent processed FE's
$tmpStore = $this->feSpecNative;
$sql = SQL_FORM_ELEMENT;
$this->feSpecNative = $this->db->sql($sql, ROW_REGULAR, [ 'yes', $this->formSpec["id"], 'native,container', $formElement['id'] ]);
HelperFormElement::explodeParameter($this->feSpecNative);
$html = $this->elements($this->store->getVar(SIP_RECORD_ID, STORE_SIP), FORM_ELEMENTS_NATIVE_SUBRECORD);
// restore parent processed FE's
$this->feSpecNative = $tmpStore;
return $html;
}
/**
* @param array $formElement
* @param $htmlFormElementId
* @param $value
* @return mixed
*/
public function buildFieldset(array $formElement, $htmlFormElementId, $value) {
// save parent processed FE's
$tmpStore = $this->feSpecNative;
// <fieldset>
$html = '<fieldset ' . $this->getAttribute('name', $htmlFormElementId) . '>';
if($formElement['label'] !== '') {
$html .= '<legend>' . $formElement['label'] . '</legend>';
}
$html .= $this->wrap[WRAP_SETUP_IN_FIELDSET][WRAP_SETUP_START];
// child FE's
$sql = SQL_FORM_ELEMENT;
$this->feSpecNative = $this->db->sql($sql, ROW_REGULAR, [ 'yes', $this->formSpec["id"], 'native,container', $formElement['id'] ]);
HelperFormElement::explodeParameter($this->feSpecNative);
$html .= $this->elements($this->store->getVar(SIP_RECORD_ID, STORE_SIP), FORM_ELEMENTS_NATIVE_SUBRECORD);
$html .= $this->wrap[WRAP_SETUP_IN_FIELDSET][WRAP_SETUP_END];
$html .= '</fieldset>';
// restore parent processed FE's
$this->feSpecNative = $tmpStore;
return $html;
}
} }
\ No newline at end of file
...@@ -35,6 +35,10 @@ class BuildFormBootstrap extends AbstractBuildForm { ...@@ -35,6 +35,10 @@ class BuildFormBootstrap extends AbstractBuildForm {
$this->wrap[WRAP_SETUP_INPUT][WRAP_SETUP_END] = ''; $this->wrap[WRAP_SETUP_INPUT][WRAP_SETUP_END] = '';
$this->wrap[WRAP_SETUP_NOTE][WRAP_SETUP_START] = ''; $this->wrap[WRAP_SETUP_NOTE][WRAP_SETUP_START] = '';
$this->wrap[WRAP_SETUP_NOTE][WRAP_SETUP_END] = ''; $this->wrap[WRAP_SETUP_NOTE][WRAP_SETUP_END] = '';
$this->wrap[WRAP_SETUP_IN_FIELDSET][WRAP_SETUP_START] = '<p>';
$this->wrap[WRAP_SETUP_IN_FIELDSET][WRAP_SETUP_END] = '</p>';
} }
/** /**
...@@ -72,10 +76,6 @@ class BuildFormBootstrap extends AbstractBuildForm { ...@@ -72,10 +76,6 @@ class BuildFormBootstrap extends AbstractBuildForm {
public function wrapElement($htmlFormElementId, $formElement, $value) { public function wrapElement($htmlFormElementId, $formElement, $value) {
$html = ''; $html = '';
// Construct Marshaller Name
$buildElementFunctionName = 'build' . $this->buildElementFunctionName[$formElement['type']];
$html .= $this->wrapItem(WRAP_SETUP_TITLE, $this->formSpec['title'], true);
$html .= '<form action="?" method="post" target="_top" accept-charset="UTF-8">';
return $html; return $html;
......
...@@ -35,6 +35,10 @@ class BuildFormPlain extends AbstractBuildForm { ...@@ -35,6 +35,10 @@ class BuildFormPlain extends AbstractBuildForm {
$this->wrap[WRAP_SETUP_INPUT][WRAP_SETUP_END] = ''; $this->wrap[WRAP_SETUP_INPUT][WRAP_SETUP_END] = '';
$this->wrap[WRAP_SETUP_NOTE][WRAP_SETUP_START] = ''; $this->wrap[WRAP_SETUP_NOTE][WRAP_SETUP_START] = '';
$this->wrap[WRAP_SETUP_NOTE][WRAP_SETUP_END] = ''; $this->wrap[WRAP_SETUP_NOTE][WRAP_SETUP_END] = '';
$this->wrap[WRAP_SETUP_IN_FIELDSET][WRAP_SETUP_START] = '<p>';
$this->wrap[WRAP_SETUP_IN_FIELDSET][WRAP_SETUP_END] = '</p>';
} }
/** /**
...@@ -75,11 +79,14 @@ class BuildFormPlain extends AbstractBuildForm { ...@@ -75,11 +79,14 @@ class BuildFormPlain extends AbstractBuildForm {
// Construct Marshaller Name // Construct Marshaller Name
$buildElementFunctionName = 'build' . $this->buildElementFunctionName[$formElement['type']]; $buildElementFunctionName = 'build' . $this->buildElementFunctionName[$formElement['type']];
$html .= $this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_START];
if($formElement['nestedInFieldSet']==='no')
$html .= $this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_START];
$html .= $this->wrapItem(WRAP_SETUP_LABEL, $this->buildLabel($htmlFormElementId, $formElement['label'])); $html .= $this->wrapItem(WRAP_SETUP_LABEL, $this->buildLabel($htmlFormElementId, $formElement['label']));
$html .= $this->wrapItem(WRAP_SETUP_INPUT, $this->$buildElementFunctionName($formElement, $htmlFormElementId, $value)); $html .= $this->wrapItem(WRAP_SETUP_INPUT, $this->$buildElementFunctionName($formElement, $htmlFormElementId, $value));
$html .= $this->wrapItem(WRAP_SETUP_NOTE, $formElement['note']); $html .= $this->wrapItem(WRAP_SETUP_NOTE, $formElement['note']);
$html .= $this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_END]; if($formElement['nestedInFieldSet']==='no')
$html .= $this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_END];
return $html; return $html;
} }
......
...@@ -38,6 +38,9 @@ class BuildFormTable extends AbstractBuildForm { ...@@ -38,6 +38,9 @@ class BuildFormTable extends AbstractBuildForm {
$this->wrap[WRAP_SETUP_SUBRECORD][WRAP_SETUP_START] = '<p>'; $this->wrap[WRAP_SETUP_SUBRECORD][WRAP_SETUP_START] = '<p>';
$this->wrap[WRAP_SETUP_SUBRECORD][WRAP_SETUP_END] = '</p>'; $this->wrap[WRAP_SETUP_SUBRECORD][WRAP_SETUP_END] = '</p>';
$this->wrap[WRAP_SETUP_IN_FIELDSET][WRAP_SETUP_START] = '<p>';
$this->wrap[WRAP_SETUP_IN_FIELDSET][WRAP_SETUP_END] = '</p>';
} }
/** /**
...@@ -85,11 +88,18 @@ class BuildFormTable extends AbstractBuildForm { ...@@ -85,11 +88,18 @@ class BuildFormTable extends AbstractBuildForm {
$html .= $this->wrapItem(WRAP_SETUP_SUBRECORD, $this->$buildElementFunctionName($formElement, $htmlFormElementId, $value)); $html .= $this->wrapItem(WRAP_SETUP_SUBRECORD, $this->$buildElementFunctionName($formElement, $htmlFormElementId, $value));
$html .= $this->wrapItem(WRAP_SETUP_SUBRECORD, $formElement['note']); $html .= $this->wrapItem(WRAP_SETUP_SUBRECORD, $formElement['note']);
} else { } else {
$html .= $this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_START]; if ($formElement['nestedInFieldSet'] === 'no') {
$html .= $this->wrapItem(WRAP_SETUP_LABEL, $this->buildLabel($htmlFormElementId, $formElement['label'])); $html .= $this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_START];
$html .= $this->wrapItem(WRAP_SETUP_INPUT, $this->$buildElementFunctionName($formElement, $htmlFormElementId, $value)); $html .= $this->wrapItem(WRAP_SETUP_LABEL, $this->buildLabel($htmlFormElementId, $formElement['label']));
$html .= $this->wrapItem(WRAP_SETUP_NOTE, $formElement['note']); $html .= $this->wrapItem(WRAP_SETUP_INPUT, $this->$buildElementFunctionName($formElement, $htmlFormElementId, $value));
$html .= $this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_END]; $html .= $this->wrapItem(WRAP_SETUP_NOTE, $formElement['note']);
$html .= $this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_END];
} else {
$html .= $this->wrapItem(WRAP_SETUP_IN_FIELDSET, $this->buildLabel($htmlFormElementId, $formElement['label']));
$html .= $this->wrapItem(WRAP_SETUP_IN_FIELDSET, $this->$buildElementFunctionName($formElement, $htmlFormElementId, $value));
if($formElement['note']!=='')
$html .= $this->wrapItem(WRAP_SETUP_IN_FIELDSET, $formElement['note']);
}
} }
return $html; return $html;
......
...@@ -21,6 +21,8 @@ const SESSION_FE_USER_UID = 'fe_user_uid'; ...@@ -21,6 +21,8 @@ const SESSION_FE_USER_UID = 'fe_user_uid';
const RETURN_URL = 'return_url'; const RETURN_URL = 'return_url';
const RETURN_SIP = 'return_sip'; const RETURN_SIP = 'return_sip';
const SQL_FORM_ELEMENT = "SELECT *, ? AS 'nestedInFieldSet' FROM FormElement AS fe WHERE fe.formId = ? AND fe.deleted = 'no' AND FIND_IN_SET(fe.class, ? ) AND fe.feIdContainer = ? AND fe.enabled='yes' ORDER BY fe.ord, fe.id";
// Sanatize Classifier // Sanatize Classifier
const SANATIZE_ALLOW_ALNUMX = "alnumx"; const SANATIZE_ALLOW_ALNUMX = "alnumx";
const SANATIZE_ALLOW_DIGIT = "digit"; const SANATIZE_ALLOW_DIGIT = "digit";
...@@ -34,6 +36,7 @@ const WRAP_SETUP_LABEL = 'label'; ...@@ -34,6 +36,7 @@ const WRAP_SETUP_LABEL = 'label';
const WRAP_SETUP_INPUT = 'input'; const WRAP_SETUP_INPUT = 'input';
const WRAP_SETUP_NOTE = 'note'; const WRAP_SETUP_NOTE = 'note';
const WRAP_SETUP_SUBRECORD = 'subrecord'; const WRAP_SETUP_SUBRECORD = 'subrecord';
const WRAP_SETUP_IN_FIELDSET = 'inFieldset';
const WRAP_SETUP_START = 'start'; const WRAP_SETUP_START = 'start';
const WRAP_SETUP_END = 'end'; const WRAP_SETUP_END = 'end';
......
...@@ -9,8 +9,7 @@ ...@@ -9,8 +9,7 @@
namespace qfq; namespace qfq;
use qfq; use qfq;
use qfq\store; use qfq\Store;
use qfq\exceptions;
use qfq\exceptions\CodeException; use qfq\exceptions\CodeException;
use qfq\exceptions\UserException; use qfq\exceptions\UserException;
use qfq\exceptions\DbException; use qfq\exceptions\DbException;
...@@ -33,7 +32,7 @@ class Database { ...@@ -33,7 +32,7 @@ class Database {
*/ */
public $pdo = null; public $pdo = null;
/** /**
* @var store\Store * @var Store
*/ */
private $store = null; private $store = null;
private $stmt = null; private $stmt = null;
...@@ -46,7 +45,7 @@ class Database { ...@@ -46,7 +45,7 @@ class Database {
* @throws UserException * @throws UserException
*/ */
public function __construct() { public function __construct() {
$this->store = \qfq\store\Store::getInstance(); $this->store = Store::getInstance();
$this->pdo = $this->store->getVar(SYSTEM_DBH, STORE_SYSTEM); $this->pdo = $this->store->getVar(SYSTEM_DBH, STORE_SYSTEM);
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
namespace qfq; namespace qfq;
use qfq; use qfq;
use qfq\store\Store; use qfq\Store;
require_once(__DIR__ . '/../qfq/store/Store.php'); require_once(__DIR__ . '/../qfq/store/Store.php');
require_once(__DIR__ . '/../qfq/Database.php'); require_once(__DIR__ . '/../qfq/Database.php');
......
...@@ -10,16 +10,20 @@ ...@@ -10,16 +10,20 @@
namespace qfq; namespace qfq;
use qfq; use qfq;
use qfq\BuildFormPlain;
use qfq\BuildFormTable;
use qfq\BuildFormBootstrap;
use qfq\exceptions\UserException; use qfq\exceptions\UserException;
use qfq\exceptions\CodeException; use qfq\exceptions\CodeException;
use qfq\exceptions\DbException; use qfq\exceptions\DbException;
use qfq\helper; //use qfq\helper;
use qfq\store\Store; use qfq\Store;
require_once(__DIR__ . '/../qfq/store/Store.php'); require_once(__DIR__ . '/../qfq/store/Store.php');
require_once(__DIR__ . '/../qfq/Constants.php'); require_once(__DIR__ . '/../qfq/Constants.php');
require_once(__DIR__ . '/../qfq/helper/KeyValueStringParser.php'); require_once(__DIR__ . '/../qfq/helper/KeyValueStringParser.php');
require_once(__DIR__ . '/../qfq/helper/HelperFormElement.php');
require_once(__DIR__ . '/../qfq/exceptions/UserException.php'); require_once(__DIR__ . '/../qfq/exceptions/UserException.php');
require_once(__DIR__ . '/../qfq/exceptions/CodeException.php'); require_once(__DIR__ . '/../qfq/exceptions/CodeException.php');
require_once(__DIR__ . '/../qfq/exceptions/DbException.php'); require_once(__DIR__ . '/../qfq/exceptions/DbException.php');
...@@ -48,7 +52,7 @@ require_once(__DIR__ . '/../qfq/BuildFormBootstrap.php'); ...@@ -48,7 +52,7 @@ require_once(__DIR__ . '/../qfq/BuildFormBootstrap.php');
class Form { class Form {
/** /**
* @var \qfq\store\Store instantiated class * @var \qfq\Store instantiated class
*/ */
protected $store = null; protected $store = null;
/** /**
...@@ -175,13 +179,17 @@ class Form { ...@@ -175,13 +179,17 @@ class Form {
$this->formSpec = $this->eval->parseArray($this->db->sql("SELECT * FROM Form AS f WHERE f.name LIKE ? AND f.deleted='no'", ROW_EXACT_1, [$formName])); $this->formSpec = $this->eval->parseArray($this->db->sql("SELECT * FROM Form AS f WHERE f.name LIKE ? AND f.deleted='no'", ROW_EXACT_1, [$formName]));
$this->store->setVar(SYSTEM_FORM_ELEMENT, '', STORE_SYSTEM); $this->store->setVar(SYSTEM_FORM_ELEMENT, '', STORE_SYSTEM);
$sql = "SELECT * FROM FormElement AS fe WHERE fe.formId = ? AND fe.deleted='no' AND fe.class = ? AND fe.enabled='yes' ORDER BY fe.ord, fe.id";
$this->feSpecAction = $this->eval->parseArray($this->db->sql($sql, ROW_REGULAR, [$this->formSpec["id"], 'action']));
$this->explodeFormElementParameter($this->feSpecAction);
// Native FormElements will be evaluated later // "SELECT *, ? AS 'nestedInFieldSet' FROM FormElement AS fe WHERE fe.formId = ? AND fe.deleted = 'no' AND FIND_IN_SET(fe.class, ? ) AND fe.feIdContainer = ? AND fe.enabled='yes' ORDER BY fe.ord, fe.id";
$this->feSpecNative = $this->db->sql($sql, ROW_REGULAR, [$this->formSpec["id"], 'native']); $sql = SQL_FORM_ELEMENT;
$this->explodeFormElementParameter($this->feSpecNative);
// FE: Action
$this->feSpecAction = $this->eval->parseArray($this->db->sql($sql, ROW_REGULAR, ['no', $this->formSpec["id"], 'action', 0]));
HelperFormElement::explodeParameter($this->feSpecAction);
// FE: Native & Container
$this->feSpecNative = $this->db->sql($sql, ROW_REGULAR, ['no', $this->formSpec["id"], 'native,container', 0]);
HelperFormElement::explodeParameter($this->feSpecNative);
return $formName; return $formName;
} }
...@@ -202,34 +210,6 @@ class Form { ...@@ -202,34 +210,6 @@ class Form {
throw new UserException("Missing form name. Not found in T3_BODYTEXT / SIP / GET", ERROR_MISSING_FORM_NAME); throw new UserException("Missing form name. Not found in T3_BODYTEXT / SIP / GET", ERROR_MISSING_FORM_NAME);
} }
/**
* Iterates over all FormElements in $elements.
* If $element['parameter'] exist and is filled: explode the content and apend them to the current FormElement Array.
*
* @param array $elements
* @throws UserException
*/
private function explodeFormElementParameter(array &$elements) {
// Iterate all FormElements
foreach ($elements AS $key => $element) {
// Something to explode?
if (isset($element['parameter']) && $element['parameter'] !== '') {
// Explode
$arr = helper\KeyValueStringParser::parse($element['parameter'], "=", "\n");
// Check if some of the exploded keys conflict with existing keys
$checkKeys = array_keys($arr);
foreach ($checkKeys AS $checkKey) {
if (isset($element[$checkKey])) {
$this->store->setVar(SYSTEM_FORM_ELEMENT, $element['name'] . ' / ' . $element['id'], STORE_SYSTEM);
$this->store->setVar(SYSTEM_FORM_ELEMENT_COLUMN, 'parameter', STORE_SYSTEM);
throw new UserException("Found reserved keyname '$checkKey'");
}
}
$elements[$key] = array_merge($element, $arr);
}
}
}
/** /**
* @return bool - 'true' if SIP exists, else 'false' * @return bool - 'true' if SIP exists, else 'false'
* @throws CodeException * @throws CodeException
......
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
namespace qfq\exceptions; namespace qfq\exceptions;
use qfq\Store;
/** /**
* Class UserException * Class UserException
* *
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
namespace qfq\exceptions; namespace qfq\exceptions;
use qfq\Store;
require_once(__DIR__ . '/../../qfq/store/Store.php'); require_once(__DIR__ . '/../../qfq/store/Store.php');
require_once(__DIR__ . '/../../qfq/Constants.php'); require_once(__DIR__ . '/../../qfq/Constants.php');
...@@ -25,7 +27,7 @@ class DbException extends \Exception { ...@@ -25,7 +27,7 @@ class DbException extends \Exception {
* @return string HTML formatted error string * @return string HTML formatted error string
*/ */
public function formatMessage() { public function formatMessage() {
$store = \qfq\store\Store::getInstance(''); $store = Store::getInstance('');
$message = '<table border=1><tr><th>DB Exception</th></tr>' . $message = '<table border=1><tr><th>DB Exception</th></tr>' .
'<tr><td>Message</td><td><b>' . $this->getMessage() . '</b></td></tr>' . '<tr><td>Message</td><td><b>' . $this->getMessage() . '</b></td></tr>' .
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
namespace qfq\exceptions; namespace qfq\exceptions;
use qfq\Store;
require_once(__DIR__ . '/../../qfq/store/Store.php'); require_once(__DIR__ . '/../../qfq/store/Store.php');
require_once(__DIR__ . '/../../qfq/Constants.php'); require_once(__DIR__ . '/../../qfq/Constants.php');
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* $Id$ * $Id$
*/ */
namespace qfq\helper; namespace qfq;
use qfq; use qfq;
use qfq\exceptions\UserException; use qfq\exceptions\UserException;
......
...@@ -7,13 +7,13 @@ ...@@ -7,13 +7,13 @@
*/ */
namespace qfq\helper; namespace qfq;
require_once(__DIR__ . '/../../qfq/Constants.php'); require_once(__DIR__ . '/../../qfq/Constants.php');
/** /**
* Class OnArray * Class OnArray
* @package qfq\helper * @package qfq
*/ */
class OnArray { class OnArray {
......
...@@ -6,13 +6,12 @@ ...@@ -6,13 +6,12 @@
* Time: 10:26 PM * Time: 10:26 PM
*/ */
namespace qfq\store; namespace qfq;
use qfq\exceptions\CodeException; use qfq\exceptions\CodeException;
use qfq\exceptions\UserException; use qfq\exceptions\UserException;
//use qfq\helper; use qfq\OnArray;
use qfq\helper\OnArray; use qfq\KeyValueStringParser;
use qfq\helper\KeyValueStringParser;
require_once(__DIR__ . '/../../qfq/helper/OnArray.php'); require_once(__DIR__ . '/../../qfq/helper/OnArray.php');
require_once(__DIR__ . '/../../qfq/Constants.php'); require_once(__DIR__ . '/../../qfq/Constants.php');
...@@ -80,7 +79,7 @@ class Sip { ...@@ -80,7 +79,7 @@ class Sip {
$script = $this->splitParamClientSip($paramArray, $clientArray, $sipArray); $script = $this->splitParamClientSip($paramArray, $clientArray, $sipArray);
// sort array to guarantee identical respresentation in $_SESSION. Param 'a, r, b, ...' should be saved as 'a, b, r, ..' // sort array to guarantee identical respresentation in $_SESSION. Param 'a, r, b, ...' should be saved as 'a, b, r, ..'
\qfq\helper\OnArray::sortKey($sipArray); OnArray::sortKey($sipArray);
// Generate keyname for $_SESSION[] // Generate keyname for $_SESSION[]
$sipParamString = OnArray::toString($sipArray); $sipParamString = OnArray::toString($sipArray);
......
...@@ -6,11 +6,12 @@ ...@@ -6,11 +6,12 @@
* Time: 6:51 PM