Commit 38e05d03 by Frederick d. Maus

local - not interesting

1 parent 6516bdeb
......@@ -138,7 +138,7 @@ class D {
}
public static function cf($param_string, $param_print=true, $param_force=false) {
public static function cf($param_string='', $param_print=true, $param_force=false) {
D::printCurrentFunction($param_print, $param_string, true);
}
......
......@@ -4,11 +4,55 @@
* könnte in
* SEOLinkCache eingesetzt werden
*/
class mcArray {
const ARRAY_MIDDLE = '=';
const ARRAY_START = '|_';
const ARRAY_STOP = '_|';
/**
* transform a array to a string ... in example for SEOLink
*
* @phpunit
*
* @param array $param_Array -- array( key1=>var1, key2=>var2, ...)
* @param string $param_StartSeperator
* @param string $param_MiddleSeperator
* @param string $param_StopSeperator
* @return string -- $param_StartSeperator
* .key1.$param_MiddleSeperator.var1.$param_MiddleSeperator
* .key2.$param_MiddleSeperator.var2.$param_StopSeperator
*/
public static function transformArrayToString(array $param_Array, $param_StartSeperator=SEOLink::ARRAY_START, $param_MiddleSeperator=SEOLink::ARRAY_MIDDLE, $param_StopSeperator=SEOLink::ARRAY_STOP) {
$return = '';
if(is_array($param_Array)) {
$return .= $param_StartSeperator;
$tmp_notfirst = false;
foreach($param_Array as $Aindex => $Avalue) {
if(is_array($Avalue)) {
D::cf('transformArrayToSEOLink rekursiv fürs Array noch nicht entwickelt');
} else {
if($tmp_notfirst) {
$return .= ''.$param_MiddleSeperator;
} else {
$tmp_notfirst = true ;
}
$return .= ''.$Aindex.$param_MiddleSeperator.$Avalue;
}
}
$return .= $param_StopSeperator;
}
return $return;
}
/**
* check if key path is in array and value is not emtpy array
*
* @phpunit
*
* @param array $param_Array
* @param string $param_key -- $param_Array[$param_key]
* @param string $param_key2 -- $param_Array[$param_key][$param_key2]
......
......@@ -28,6 +28,34 @@ if(!isset($__mc_D_LOGFILE)) {
$__mc_D_LOGFILE = $__BASEPATH_EX.'log/mc.'.$string.'.DEV_D.log';
//
}
if(!isset($__mc_D_LOGFILE_RESET)) {
/**
* @var bool
* remove every time the file and start a new file
* @author f@mensch.coop @since 20120301
*/
$__mc_D_LOGFILE_RESET = true;
}
if(!isset($__mc_PDO_LOGFILE)) {
/**
* @var string -- file for the D Output
*/
$__mc_PDO_LOGFILE = $__BASEPATH_EX.'log/mc.'.$string.'.DEV_PDO.log';
}
if(!isset($__mc_PDO_LOGFILE_RESET)) {
/**
* @var bool
* remove every time the file and start a new file
* @author f@mensch.coop @since 20120301
*/
$__mc_PDO_LOGFILE_RESET = true;
}
if(!isset($__mc_D_SCREENOUTPUT)) {
/**
......
......@@ -22,5 +22,10 @@ if($_LOSP_DEV) {
// D::li($__mc_D_LOGFILE);
D::printToFile($__mc_D_LOGFILE,'a');
}
if($__mc_PDO_LOGFILE) {
$PDOLog = mcPDOLogger::getMessagesAsText();
mcFile::write($__mc_PDO_LOGFILE, $PDOLog, 'a');
}
}
?>
\ No newline at end of file
......@@ -35,6 +35,24 @@ if($_LOSP_DEV) {
mcFile::write($__mc_D_LOGFILE, $var_message, 'a');
}
}
if($__mc_PDO_LOGFILE) {
if($__mc_PDO_LOGFILE_RESET) {
$var_message = '['.date('d. m. Y G:i').'] DEVMODE: logfile wurde zurvor geloescht';
unlink ( $__mc_PDO_LOGFILE );
mcFile::write($__mc_PDO_LOGFILE, $var_message, 'w');
} else {
$var_message = mcCONST::LINEBREAK.mcCONST::LINEBREAK.mcCONST::LINEBREAK.mcCONST::LINEBREAK.mcCONST::LINEBREAK.mcCONST::LINEBREAK
.'################################################'.mcCONST::LINEBREAK
.'################################################'.mcCONST::LINEBREAK
.'################################################'.mcCONST::LINEBREAK
.'# ['.date('d. m. Y G:i').'] DEVMODE #'.mcCONST::LINEBREAK
.'################################################'.mcCONST::LINEBREAK;
mcFile::write($__mc_PDO_LOGFILE, $var_message, 'a');
}
}
//mcFile::write('log/tmp.bla', date('d.m.Y G:i:s').': '.$_SERVER['SCRIPT_NAME'].' -- '.$_SERVER['REQUEST_URI'].mcCONST::TAB.($_SERVER['SCRIPT_NAME']==$_SERVER['REQUEST_URI']).mcCONST::LINEBREAK, 'a');
if(is_array($__mc_Report)) {
foreach($__mc_Report as $Report) {
......
......@@ -45,7 +45,7 @@ require_once $__PATH_to_mcClasses . 'ReportHandling/class_mcReport.inc.php';
require_once $__PATH_to_mcClasses . 'ReportHandling/class_Error.inc.php';
require_once $__PATH_to_mcClasses . 'ReportHandling/class_Message.inc.php';
require_once $__PATH_to_mcClasses . 'ReportHandling/class_mcEvent.inc.php';
require_once $__PATH_to_mcClasses . 'ReportHandling/class_mcEvent.inc.php';
require_once $__PATH_to_mcClasses . 'ReportHandling/class_mcPDOLogger.inc.php';
require_once $__PATH_to_mcClasses . 'D/class_D.inc.php';
require_once $__PATH_to_mcClasses . 'class_mcException.inc.php';
require_once $__PATH_to_mcClasses . 'class_mcPerformance.inc.php';
......@@ -57,5 +57,14 @@ require_once $__PATH_to_mcClasses . 'class_mcFPDF.inc.php';
require_once $__PATH_to_mcClasses . 'class_mcLanguage.inc.php';
require_once $__PATH_to_mcClasses . 'finance/class_mcZinsmethoden.inc.php';
/**
* mcPUIX - database - userinterface
*/
require_once $__PATH_to_mcClasses . 'mcPUIX/class_mcPUIX.inc.php';
require_once $__PATH_to_mcClasses . 'mcPUIX/class_mcPUIX_PDO.inc.php';
require_once $__PATH_to_mcClasses . 'mcPUIX/class_mcPUIX_CONFIG.inc.php';
require_once $__PATH_to_mcClasses . 'mcPUIX/class_mcPUIX_DOM.inc.php';
require_once $__PATH_to_mcClasses . 'mcPUIX/class_Converter.inc.php';
?>
\ No newline at end of file
......@@ -5,7 +5,7 @@ require_once 'basepath.inc.php';
require_once $__BASEPATH_EX . '../class_mcArray.inc.php';
/**
* Test class for DBUIHelpers_PHP.
* Test class for mcPUIX_PHP.
* Generated by PHPUnit on 2010-07-13 at 14:12:12.
*/
class mcArray_PHPTest extends PHPUnit_Framework_TestCase {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!