Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
ncphp
/
mcClasses
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 38e05d03
authored
Mar 11, 2012
by
Frederick d. Maus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
local - not interesting
1 parent
6516bdeb
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
109 additions
and
3 deletions
D/class_D.inc.php
class_mcArray.inc.php
config.php
doOnTheEnd.php
doOnTheStart.php
include.php
phpunit/class_mcArray_PHPTest.inc.php
D/class_D.inc.php
View file @
38e05d0
...
@@ -138,7 +138,7 @@ class D {
...
@@ -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
);
D
::
printCurrentFunction
(
$param_print
,
$param_string
,
true
);
}
}
...
...
class_mcArray.inc.php
View file @
38e05d0
...
@@ -4,11 +4,55 @@
...
@@ -4,11 +4,55 @@
* könnte in
* könnte in
* SEOLinkCache eingesetzt werden
* SEOLinkCache eingesetzt werden
*/
*/
class
mcArray
{
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
* check if key path is in array and value is not emtpy array
*
*
* @phpunit
*
* @param array $param_Array
* @param array $param_Array
* @param string $param_key -- $param_Array[$param_key]
* @param string $param_key -- $param_Array[$param_key]
* @param string $param_key2 -- $param_Array[$param_key][$param_key2]
* @param string $param_key2 -- $param_Array[$param_key][$param_key2]
...
...
config.php
View file @
38e05d0
...
@@ -28,6 +28,34 @@ if(!isset($__mc_D_LOGFILE)) {
...
@@ -28,6 +28,34 @@ if(!isset($__mc_D_LOGFILE)) {
$__mc_D_LOGFILE
=
$__BASEPATH_EX
.
'log/mc.'
.
$string
.
'.DEV_D.log'
;
$__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
))
{
if
(
!
isset
(
$__mc_D_SCREENOUTPUT
))
{
/**
/**
...
...
doOnTheEnd.php
View file @
38e05d0
...
@@ -22,5 +22,10 @@ if($_LOSP_DEV) {
...
@@ -22,5 +22,10 @@ if($_LOSP_DEV) {
// D::li($__mc_D_LOGFILE);
// D::li($__mc_D_LOGFILE);
D
::
printToFile
(
$__mc_D_LOGFILE
,
'a'
);
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
doOnTheStart.php
View file @
38e05d0
...
@@ -35,6 +35,24 @@ if($_LOSP_DEV) {
...
@@ -35,6 +35,24 @@ if($_LOSP_DEV) {
mcFile
::
write
(
$__mc_D_LOGFILE
,
$var_message
,
'a'
);
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');
//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
))
{
if
(
is_array
(
$__mc_Report
))
{
foreach
(
$__mc_Report
as
$Report
)
{
foreach
(
$__mc_Report
as
$Report
)
{
...
...
include.php
View file @
38e05d0
...
@@ -45,7 +45,7 @@ require_once $__PATH_to_mcClasses . 'ReportHandling/class_mcReport.inc.php';
...
@@ -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_Error.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'ReportHandling/class_Message.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_mc
Event
.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'ReportHandling/class_mc
PDOLogger
.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'D/class_D.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_mcException.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'class_mcPerformance.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'class_mcPerformance.inc.php'
;
...
@@ -57,5 +57,14 @@ require_once $__PATH_to_mcClasses . 'class_mcFPDF.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
.
'class_mcLanguage.inc.php'
;
require_once
$__PATH_to_mcClasses
.
'finance/class_mcZinsmethoden.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
phpunit/class_mcArray_PHPTest.inc.php
View file @
38e05d0
...
@@ -5,7 +5,7 @@ require_once 'basepath.inc.php';
...
@@ -5,7 +5,7 @@ require_once 'basepath.inc.php';
require_once
$__BASEPATH_EX
.
'../class_mcArray.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.
* Generated by PHPUnit on 2010-07-13 at 14:12:12.
*/
*/
class
mcArray_PHPTest
extends
PHPUnit_Framework_TestCase
{
class
mcArray_PHPTest
extends
PHPUnit_Framework_TestCase
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment