Commit 0d559902 authored by Rafael Ostertag's avatar Rafael Ostertag
Browse files

Merge remote-tracking branch 'origin/crose_work' into raos_work

parents 9fc7cb87 1761cc07
......@@ -319,12 +319,16 @@ abstract class AbstractBuildForm {
* @param $recordId
* @param string $filter FORM_ELEMENTS_NATIVE | FORM_ELEMENTS_SUBRECORD | FORM_ELEMENTS_NATIVE_SUBRECORD
* @param int $feIdContainer
* @param array $json
* @param string $modeCollectFe
* @param bool $htmlElementNameIdZero
* @param string $storeUse
* @return string
* @throws CodeException
* @throws DbException
* @throws \qfq\UserFormException
*/
public function elements($recordId, $filter = FORM_ELEMENTS_NATIVE, $feIdContainer = 0, &$json,
public function elements($recordId, $filter = FORM_ELEMENTS_NATIVE, $feIdContainer = 0, array &$json,
$modeCollectFe = FLAG_DYNAMIC_UPDATE, $htmlElementNameIdZero = false, $storeUse = STORE_USE_DEFAULT) {
$html = '';
......@@ -389,7 +393,12 @@ abstract class AbstractBuildForm {
} else {
// for non container elements: just add the current json status
if ($modeCollectFe === FLAG_ALL || ($modeCollectFe == FLAG_DYNAMIC_UPDATE && $fe['dynamicUpdate'] == 'yes')) {
$json[] = $jsonElement;
if (isset($jsonElement[0]) && is_array($jsonElement[0])) {
// Checkboxes are delivered as array of arrays: unnest them and append them to the existing json array.
$json = array_merge($json, $jsonElement);
} else {
$json[] = $jsonElement;
}
}
}
......@@ -417,12 +426,12 @@ abstract class AbstractBuildForm {
/**
* Create a hidden sip, based on latest STORE_SIP Values. Return complete HTML 'hidden' element.
*
* @param $json
* @param array $json
* @return string <input type='hidden' name='s' value='<sip>'>
* @throws CodeException
* @throws \qfq\UserFormException
*/
public function buildHiddenSip(&$json) {
public function buildHiddenSip(array &$json) {
$sipArray = $this->store->getStore(STORE_SIP);
unset($sipArray[SIP_SIP]);
unset($sipArray[SIP_URLPARAM]);
......@@ -444,12 +453,11 @@ abstract class AbstractBuildForm {
* @return array
*/
private function getJsonElementUpdate($htmlFormElementId, $value, $feMode) {
$json = $this->getJsonFeMode($feMode);
$json['form-element'] = $htmlFormElementId;
$json['value'] = $value;
// $json['disabled'] = ($feMode === 'disabled');
// $json['readonly'] = ($feMode === 'readonly');
return $json;
}
......@@ -564,16 +572,17 @@ abstract class AbstractBuildForm {
* Builds HTML 'input' element.
* Format: <input name="$htmlFormElementId" <type="email|input|password|url" [autocomplete="autocomplete"] [autofocus="autofocus"]
* [maxlength="$maxLength"] [placeholder="$placeholder"] [size="$size"] [min="$min"] [max="$max"]
* [pattern="$pattern"] [readonly="readonly"] [required="required"] [disabled="disabled"] value="$value">
* [pattern="$pattern"] [required="required"] [disabled="disabled"] value="$value">
*
*
* @param array $formElement
* @param $htmlFormElementId
* @param $value
* @param array $json
* @return string
* @throws UserFormException
* @throws \qfq\UserFormException
*/
public function buildInput(array $formElement, $htmlFormElementId, $value, &$json) {
public function buildInput(array $formElement, $htmlFormElementId, $value, array &$json) {
$textarea = '';
$attribute = Support::doAttribute('name', $htmlFormElementId);
......@@ -807,15 +816,17 @@ abstract class AbstractBuildForm {
*
* Format: <input type="hidden" name="$htmlFormElementId" value="$valueUnChecked">
* <input name="$htmlFormElementId" type="checkbox" [autofocus="autofocus"]
* [readonly="readonly"] [required="required"] [disabled="disabled"] value="<value>" [checked="checked"] >
* [required="required"] [disabled="disabled"] value="<value>" [checked="checked"] >
*
* @param array $formElement
* @param $htmlFormElementId
* @param $value
* @param array $json
* @return string
* @throws UserFormException
* @throws CodeException
* @throws \qfq\UserFormException
*/
public function buildCheckbox(array $formElement, $htmlFormElementId, $value, &$json) {
public function buildCheckbox(array $formElement, $htmlFormElementId, $value, array &$json) {
$itemKey = array();
$itemValue = array();
......@@ -840,17 +851,15 @@ abstract class AbstractBuildForm {
switch ($formElement['checkBoxMode']) {
case 'single':
$html = $this->buildCheckboxSingle($formElement, $htmlFormElementId, $attributeBase, $value);
$html = $this->buildCheckboxSingle($formElement, $htmlFormElementId, $attributeBase, $value, $json);
break;
case 'multi';
$html = $this->buildCheckboxMulti($formElement, $htmlFormElementId, $attributeBase, $value, $itemKey, $itemValue);
$html = $this->buildCheckboxMulti($formElement, $htmlFormElementId, $attributeBase, $value, $itemKey, $itemValue, $json);
break;
default:
throw new UserFormException('checkBoxMode: \'' . $formElement['checkBoxMode'] . '\' is unknown.', ERROR_CHECKBOXMODE_UNKNOWN);
}
$json = $this->getJsonElementUpdate($htmlFormElementId, $value, $formElement[FE_MODE]);
// return Support::wrapTag('<div class="checkbox">', $html, true);
return $html;
}
......@@ -1016,10 +1025,12 @@ abstract class AbstractBuildForm {
* @param $htmlFormElementId
* @param $attribute
* @param $value
* @param array $json
* @return string
*/
public function buildCheckboxSingle(array $formElement, $htmlFormElementId, $attribute, $value) {
public function buildCheckboxSingle(array $formElement, $htmlFormElementId, $attribute, $value, array &$json) {
$html = '';
$valueJson = false;
$attribute .= Support::doAttribute('name', $htmlFormElementId);
$attribute .= Support::doAttribute('value', $formElement['checked'], false);
......@@ -1028,6 +1039,7 @@ abstract class AbstractBuildForm {
if ($formElement['checked'] === $value) {
$attribute .= Support::doAttribute('checked', 'checked');
$valueJson = true;
}
$attribute .= $this->getAttributeList($formElement, ['autofocus']);
......@@ -1042,6 +1054,8 @@ abstract class AbstractBuildForm {
$html = Support::wrapTag("<label>", $html, true);
$html = Support::wrapTag("<div class='checkbox'>", $html, true);
$json = $this->getJsonElementUpdate($htmlFormElementId, $valueJson, $formElement[FE_MODE]);
return $html;
}
......@@ -1057,9 +1071,11 @@ abstract class AbstractBuildForm {
* @param $value
* @param array $itemKey
* @param array $itemValue
* @param array $json
* @return string
*/
public function buildCheckboxMulti(array $formElement, $htmlFormElementId, $attributeBase, $value, array $itemKey, array $itemValue) {
public function buildCheckboxMulti(array $formElement, $htmlFormElementId, $attributeBase, $value, array $itemKey, array $itemValue, array &$json) {
$json = array();
// Defines which of the checkboxes will be checked.
$values = explode(',', $value);
......@@ -1075,7 +1091,7 @@ abstract class AbstractBuildForm {
$flagFirst = true;
for ($ii = 0, $jj = 1; $ii < count($itemKey); $ii++, $jj++) {
$jsonValue = false;
$attribute = $attributeBase;
// Do this only the first round.
......@@ -1090,6 +1106,7 @@ abstract class AbstractBuildForm {
// Check if the given key is found in field.
if (false !== array_search($itemKey[$ii], $values)) {
$attribute .= Support::doAttribute('checked', 'checked');
$jsonValue = true;
}
// '&nbsp;' - This is necessary to correctly align an empty input.
......@@ -1104,7 +1121,6 @@ abstract class AbstractBuildForm {
$htmlElement = Support::wrapTag('<label>', $htmlElement);
}
$htmlElement = Support::wrapTag("<div class='$checkboxClass'>", $htmlElement, true);
if ($formElement['maxLength'] > 1) {
......@@ -1118,6 +1134,8 @@ abstract class AbstractBuildForm {
}
$html .= $htmlElement . $br;
$json[] = $this->getJsonElementUpdate($htmlFormElementId, $jsonValue, $formElement[FE_MODE]);
}
// if (isset($formElement[CHECKBOX_ORIENTATION]) && $formElement[CHECKBOX_ORIENTATION] !== 'vertical')
......@@ -1135,9 +1153,12 @@ abstract class AbstractBuildForm {
* @param array $formElement
* @param $htmlFormElementId
* @param $value
* @param array $json
* @return string
* @throws CodeException
* @throws \qfq\UserFormException
*/
public function buildHidden(array $formElement, $htmlFormElementId, $value, &$json) {
public function buildHidden(array $formElement, $htmlFormElementId, $value, array &$json) {
$this->store->setVar($htmlFormElementId, $value, STORE_SIP, false);
}
......@@ -1149,15 +1170,17 @@ abstract class AbstractBuildForm {
*
* Format: <input type="hidden" name="$htmlFormElementId" value="$valueUnChecked">
* <input name="$htmlFormElementId" type="radio" [autofocus="autofocus"]
* [readonly="readonly"] [required="required"] [disabled="disabled"] value="<value>" [checked="checked"] >
* [required="required"] [disabled="disabled"] value="<value>" [checked="checked"] >
*
* @param array $formElement
* @param $htmlFormElementId
* @param $value
* @param array $json
* @return string
* @throws UserFormException
* @throws CodeException
* @throws \qfq\UserFormException
*/
public function buildRadio(array $formElement, $htmlFormElementId, $value, &$json) {
public function buildRadio(array $formElement, $htmlFormElementId, $value, array &$json) {
$itemKey = array();
$itemValue = array();
......@@ -1229,9 +1252,12 @@ abstract class AbstractBuildForm {
* @param array $formElement
* @param $htmlFormElementId
* @param $value
* @param array $json
* @return mixed
* @throws CodeException
* @throws \qfq\UserFormException
*/
public function buildSelect(array $formElement, $htmlFormElementId, $value, &$json) {
public function buildSelect(array $formElement, $htmlFormElementId, $value, array &$json) {
$itemKey = array();
$itemValue = array();
......@@ -1284,10 +1310,12 @@ abstract class AbstractBuildForm {
* @param array $formElement
* @param $htmlFormElementId
* @param $value
* @param array $json
* @return string
* @throws UserFormException
* @throws CodeException
* @throws \qfq\UserFormException
*/
public function buildSubrecord(array $formElement, $htmlFormElementId, $value, &$json) {
public function buildSubrecord(array $formElement, $htmlFormElementId, $value, array &$json) {
$rcText = false;
$nameColumnId = 'id';
$targetTableName = '';
......@@ -1626,10 +1654,12 @@ abstract class AbstractBuildForm {
* @param array $formElement
* @param $htmlFormElementId
* @param $value
* @param array $json
* @return string
* @throws UserFormException
* @throws CodeException
* @throws \qfq\UserFormException
*/
public function buildFile(array $formElement, $htmlFormElementId, $value, &$json) {
public function buildFile(array $formElement, $htmlFormElementId, $value, array &$json) {
$attribute = '';
$arr = array();
......@@ -1680,16 +1710,17 @@ abstract class AbstractBuildForm {
* Builds HTML 'input' element.
* Format: <input name="$htmlFormElementId" <type="email|input|password|url" [autocomplete="autocomplete"] [autofocus="autofocus"]
* [maxlength="$maxLength"] [placeholder="$placeholder"] [size="$size"] [min="$min"] [max="$max"]
* [pattern="$pattern"] [readonly="readonly"] [required="required"] [disabled="disabled"] value="$value">
* [pattern="$pattern"] [required="required"] [disabled="disabled"] value="$value">
*
*
* @param array $formElement
* @param $htmlFormElementId
* @param $value
* @param array $json
* @return string
* @throws UserFormException
* @throws \qfq\UserFormException
*/
public function builddateJQW(array $formElement, $htmlFormElementId, $value, &$json) {
public function builddateJQW(array $formElement, $htmlFormElementId, $value, array &$json) {
$textarea = '';
$attribute = Support::doAttribute('name', $htmlFormElementId);
......@@ -1733,17 +1764,17 @@ abstract class AbstractBuildForm {
* Builds HTML 'input' element.
* Format: <input name="$htmlFormElementId" <type="date" [autocomplete="autocomplete"] [autofocus="autofocus"]
* [maxlength="$maxLength"] [placeholder="$placeholder"] [size="$size"] [min="$min"] [max="$max"]
* [pattern="$pattern"] [readonly="readonly"] [required="required"] [disabled="disabled"] value="$value">
* [pattern="$pattern"] [required="required"] [disabled="disabled"] value="$value">
*
*
* @param array $formElement
* @param $htmlFormElementId
* @param $value
* @param $json
* @param array $json
* @return string
* @throws UserFormException
*/
public function buildDateTime(array $formElement, $htmlFormElementId, $value, &$json) {
public function buildDateTime(array $formElement, $htmlFormElementId, $value, array &$json) {
$attribute = Support::doAttribute('name', $htmlFormElementId);
$attribute .= Support::doAttribute('class', 'form-control');
......@@ -1848,9 +1879,10 @@ abstract class AbstractBuildForm {
* @param array $formElement
* @param $htmlFormElementId
* @param $value
* @param array $json
* @return mixed
*/
public function buildNote(array $formElement, $htmlFormElementId, $value, &$json) {
public function buildNote(array $formElement, $htmlFormElementId, $value, array &$json) {
return $value;
}
......@@ -1860,9 +1892,10 @@ abstract class AbstractBuildForm {
* @param array $formElement
* @param $htmlFormElementId
* @param $value
* @param array $json
* @return mixed
*/
public function buildPill(array $formElement, $htmlFormElementId, $value, &$json) {
public function buildPill(array $formElement, $htmlFormElementId, $value, array &$json) {
return $value;
}
......@@ -1872,9 +1905,12 @@ abstract class AbstractBuildForm {
* @param array $formElement
* @param $htmlFormElementId
* @param $value
* @param array $json
* @return mixed
* @throws CodeException
* @throws DbException
*/
public function buildFieldset(array $formElement, $htmlFormElementId, $value, &$json) {
public function buildFieldset(array $formElement, $htmlFormElementId, $value, array &$json) {
$attribute = '';
// save parent processed FE's
......
......@@ -45,7 +45,7 @@ const RETURN_ARRAY = 'return_array';
const SQL_FORM_ELEMENT_SPECIFIC_CONTAINER = "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";
const SQL_FORM_ELEMENT_ALL_CONTAINER = "SELECT *, ? AS 'nestedInFieldSet' FROM FormElement AS fe WHERE fe.formId = ? AND fe.deleted = 'no' AND FIND_IN_SET(fe.class, ? ) AND fe.enabled='yes' ORDER BY fe.ord, fe.id";
const SQL_FORM_ELEMENT_SIMPLE_ALL_CONTAINER = "SELECT fe.id, fe.name, fe.label, fe.type, fe.checkType, fe.checkPattern, fe.mode, fe.parameter FROM FormElement AS fe, Form AS f WHERE f.name = ? AND f.id = fe.formId AND fe.deleted = 'no' AND fe.class = 'native' AND fe.enabled='yes' ORDER BY fe.ord, fe.id";
const SQL_FORM_ELEMENT_SIMPLE_ALL_CONTAINER = "SELECT fe.id, fe.name, fe.label, fe.type, fe.checkType, fe.checkPattern, fe.mode, fe.modeSql, fe.parameter FROM FormElement AS fe, Form AS f WHERE f.name = ? AND f.id = fe.formId AND fe.deleted = 'no' AND fe.class = 'native' AND fe.enabled='yes' ORDER BY fe.ord, fe.id";
// SANITIZE Classifier
const SANITIZE_ALLOW_ALNUMX = "alnumx";
......@@ -384,6 +384,7 @@ const FE_SUBRECORD_ROW_TITLE = '_rowTitle';
// FormElement columns: real
const FE_TYPE = 'type';
const FE_MODE = 'mode';
const FE_MODE_SQL = 'modeSql';
// FormElement columns: via parameter field
const FE_DATE_FORMAT = 'dateFormat'; // value: FORMAT_DATE_INTERNATIONAL | FORMAT_DATE_GERMAN
......
......@@ -20,11 +20,18 @@ class File {
*/
private $store = null;
/**
* @var Session
*/
private $session = null;
/**
* @param bool|false $phpUnit
*/
public function __construct($phpUnit = false) {
$this->store = Store::getInstance('', $phpUnit);
$this->session = Session::getInstance($phpUnit);
// $sessionName = $this->store->getVar(SYSTEM_SESSION_NAME, STORE_SYSTEM);
// $this->sip = new Sip($sessionName);
$this->store = Store::getInstance('', $phpUnit);
$this->uploadErrMsg = [
UPLOAD_ERR_INI_SIZE => "The uploaded file exceeds the upload_max_filesize directive in php.ini",
......
......@@ -25,6 +25,7 @@ use qfq;
require_once(__DIR__ . '/../qfq/store/Store.php');
require_once(__DIR__ . '/../qfq/store/FillStoreForm.php');
require_once(__DIR__ . '/../qfq/store/Session.php');
require_once(__DIR__ . '/../qfq/Constants.php');
require_once(__DIR__ . '/../qfq/Save.php');
require_once(__DIR__ . '/../qfq/helper/KeyValueStringParser.php');
......@@ -58,14 +59,17 @@ require_once(__DIR__ . '/../qfq/BodytextParser.php');
* @package qfq
*/
class QuickFormQuery {
/**
* @var \qfq\Store instantiated class
*/
protected $store = null;
/**
* @var Database instantiated class
*/
protected $db = null;
/**
* @var Evaluate instantiated class
*/
......@@ -73,13 +77,22 @@ class QuickFormQuery {
protected $formSpec = array();
protected $feSpecAction = array(); // Form Definition: copy of the loaded form
protected $feSpecNative = array(); // FormEelement Definition: all formElement.class='action' of the loaded form
/**
* @var array
*/
private $t3data = array(); // FormEelement Definition: all formElement.class='native' of the loaded form
/**
* @var bool
*/
private $phpUnit = false;
/**
* @var Session
*/
private $session = null;
/*
* TODO:
* Preparation: setup logging, database access, record locking
......@@ -117,7 +130,7 @@ class QuickFormQuery {
// $arr1['session.name'] = ini_get('session.name');
// Refresh the session even if no new data saved.
$_SESSION['LAST_ACTIVITY'] = time();
Session::set('LAST_ACTIVITY', time());
set_error_handler("\\qfq\\ErrorHandler::exception_error_handler");
......@@ -133,6 +146,7 @@ class QuickFormQuery {
$bodytext = $this->t3data['bodytext'];
$this->session = Session::getInstance($phpUnit);
$this->store = Store::getInstance($bodytext, $phpUnit);
$this->store->setVar(TYPO3_TT_CONTENT_UID, $t3data['uid'], STORE_TYPO3);
$this->db = new Database();
......
......@@ -512,6 +512,9 @@ class Support {
self::setIfNotSet($formElement, FE_SHOW_ZERO, '0');
self::setIfNotSet($formElement, FE_DATE_FORMAT, $store->getVar(SYSTEM_DATE_FORMAT, STORE_SYSTEM));
if ($formElement[FE_MODE_SQL] != '')
$formElement[FE_MODE] = $formElement[FE_MODE_SQL];
return $formElement;
}
......
......@@ -121,9 +121,10 @@ class SqlReportException extends \Exception {
public function errorMessage() {
// global $BE_USER; TA: Du sollst kein global verwenden!!
//error message
// if ($BE_USER->user["uid"]>0) { TA: Du sollst kein global verwenden!!
if ($GLOBALS['BE_USER']->user["uid"] > 0 || $_SESSION[FORMREPORT]['be_user_uid'] > 0) {
$formreport = Session::get(FORMREPORT);
$beUserUid = ($formreport !== false && isset($formreport['be_user_uid'])) ? $formreport['be_user_uid'] : 0;
if ($GLOBALS['BE_USER']->user["uid"] > 0 || $beUserUid > 0) {
$errorMsg = nl2br("<hr />Error: <strong>" . htmlentities($this->getMessage()) . "</strong><br />MySQL: <strong>" . mysql_error() . "</strong><hr />");
$errorMsg .= "SQL: <strong>" . htmlentities($this->sql) . "</strong><hr />";
$errorMsg .= "Formreport: <strong>" . $this->fr_error["row"] . "</strong><hr />";
......@@ -168,8 +169,9 @@ class CodeReportException extends \Exception {
public function errorMessage() {
// global $BE_USER; TA: Du sollst kein global verwenden!!
// if ($BE_USER->user["uid"]>0) { TA: Du sollst kein global verwenden!!
if ($GLOBALS['BE_USER']->user["uid"] > 0 || $_SESSION[FORMREPORT]['be_user_uid'] > 0) {
$formreport = Session::get(FORMREPORT);
$beUserUid = ($formreport !== false && isset($formreport['be_user_uid'])) ? $formreport['be_user_uid'] : 0;
if ($GLOBALS['BE_USER']->user["uid"] > 0 || $beUserUid > 0) {
$errorMsg = nl2br("<hr />Error: <strong>" . $this->getMessage() . "</strong><br />File: <strong>" . $this->file . "</strong><br />Line: <strong>" . $this->line . "</strong><hr />");
$errorMsg .= "StackTrace<pre>" . nl2br($this->getTraceAsString()) . "</pre><hr />";
} else {
......@@ -208,7 +210,9 @@ class UserReportExceptionUnused extends \Exception {
* @return string
*/
public function errorMessage() {
if ($GLOBALS['BE_USER']->user["uid"] > 0 || $_SESSION[FORMREPORT]['be_user_uid'] > 0) {
$formreport = Session::get(FORMREPORT);
$beUserUid = ($formreport !== false && isset($formreport['be_user_uid'])) ? $formreport['be_user_uid'] : 0;
if ($GLOBALS['BE_USER']->user["uid"] > 0 || $beUserUid > 0) {
$errorMsg = nl2br("<hr />Error: <strong>" . $this->getMessage() . "</strong><br />File: <strong>" . $this->file . "</strong><br />Line: <strong>" . $this->line . "</strong><hr />");
$errorMsg .= "StackTrace<pre>" . nl2br($this->getTraceAsString()) . "</pre><hr />";
} else {
......
......@@ -106,9 +106,9 @@ class FillStoreForm {
// Preparation for Log, Debug
$this->store->setVar(SYSTEM_FORM_ELEMENT, Logger::formatFormElementName($formElement), STORE_SYSTEM);
// evaluate current FormElement
// $evaluate = new Evaluate($this->store, $this->db);
// $formElement = $evaluate->parseArray($fe, $debugStack);
// evaluate current FormElement: e.g. FE_MODE_SQL
$evaluate = new Evaluate($this->store, $this->db);
$formElement = $evaluate->parseArray($formElement, $debugStack);
// Get related formElement.
// construct the field name used in the form
......
<?php
/**
* Created by PhpStorm.
* User: crose
* Date: 5/4/16
* Time: 1:34 PM
*/
namespace qfq;
class Session {
private static $instance = null;
private static $phpUnit = null;
private static $sessionLocal = array();
/**
* @param bool|false $phpUnit
* @throws CodeException
*/
private function __construct($phpUnit = false) {
if (self::$phpUnit !== null)
throw new CodeException("Try to set flag phpunit again - that should not happen.", ERROR_CODE_SHOULD_NOT_HAPPEN);
self::$phpUnit = $phpUnit;
if (self::$phpUnit) {
self::$sessionLocal = array();
} else {
session_name();
session_start();
}
}
/**
* @param bool|false $phpUnit
* @return null|\qfq\Store
*/
public static function getInstance($phpUnit = false) {
// Design Pattern: Singleton
if (self::$instance === null) {
self::$instance = new self($phpUnit);
}
return self::$instance;
}
/**
* @param $key
* @return bool
*/
public static function get($key) {
if (self::$phpUnit) {
if (isset(self::$sessionLocal[$key]))
$value = self::$sessionLocal[$key];
else
$value = false;
} else {
if (isset($_SESSION[$key]))
$value = $_SESSION[$key];
else
$value = false;
}
return $value;
}
/**
* @param $key
* @param $value
*/
public static function set($key, $value) {
if (self::$phpUnit) {
self::$sessionLocal[$key] = $value;
} else {
$_SESSION[$key] = $value;
}
}
/**
*/
public static function clear() {
if (self::$phpUnit) {
self::$sessionLocal = array();
} else {
unset($_SESSION);
}
}
}
\ No newline at end of file
......@@ -16,6 +16,8 @@ use qfq\KeyValueStringParser;