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 6516bdeb
authored
Mar 10, 2012
by
Frederick d. Maus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
D::cf
1 parent
612ea079
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
6 deletions
D/class_D.inc.php
class_mcArray.inc.php
config.php
doOnTheEnd.php
doOnTheStart.php
D/class_D.inc.php
View file @
6516bde
...
@@ -138,13 +138,17 @@ class D {
...
@@ -138,13 +138,17 @@ class D {
}
}
public
static
function
cf
(
$param_string
,
$param_print
=
true
,
$param_force
=
false
)
{
D
::
printCurrentFunction
(
$param_print
,
$param_string
,
true
);
}
/**
/**
* Funktion zeigt html liste
* Funktion zeigt html liste
* <li>$param_string</li>
* <li>$param_string</li>
*/
*/
public
static
function
li
(
$param_string
,
$param_print
=
true
,
$param_force
=
false
)
{
public
static
function
li
(
$param_string
,
$param_print
=
true
,
$param_force
=
false
)
{
self
::
printCurrentFunction
(
$param_print
);
D
::
printCurrentFunction
(
$param_print
);
self
::
new_echo
(
"<li>"
.
$param_string
.
"</li>"
,
$param_print
,
$param_force
);
D
::
new_echo
(
"<li>"
.
$param_string
.
"</li>"
,
$param_print
,
$param_force
);
}
}
public
static
function
kindof
(
$param_kindof
,
$param_string
=
""
,
$param_print
=
true
,
$param_force
=
false
)
{
public
static
function
kindof
(
$param_kindof
,
$param_string
=
""
,
$param_print
=
true
,
$param_force
=
false
)
{
self
::
printCurrentFunction
(
$param_print
);
self
::
printCurrentFunction
(
$param_print
);
...
@@ -229,11 +233,14 @@ class D {
...
@@ -229,11 +233,14 @@ class D {
* @static
* @static
*/
*/
private
static
function
printCurrentFunction
(
$param_print
,
$param_string
=
''
)
{
private
static
function
printCurrentFunction
(
$param_print
,
$param_string
=
''
,
$param_onlyFunction
=
false
)
{
if
(
$param_print
)
{
if
(
$param_print
)
{
$array
=
debug_backtrace
();
$array
=
debug_backtrace
();
$i
=
2
;
$i
=
2
;
if
(
$param_onlyFunction
)
{
self
::
new_echo
(
''
.
$array
[
$i
-
1
][
"line"
]
.
':'
.
$array
[
$i
][
"class"
]
.
$array
[
$i
][
"type"
]
.
$array
[
$i
][
"function"
]
.
'(): '
.
$param_string
);
}
else
{
if
(
is_array
(
$array
)
&&
array_key_exists
(
$i
,
$array
)){
if
(
is_array
(
$array
)
&&
array_key_exists
(
$i
,
$array
)){
// echo 'hello<br><pre>';
// echo 'hello<br><pre>';
...
@@ -250,13 +257,14 @@ class D {
...
@@ -250,13 +257,14 @@ class D {
// D::ulli($v.': '.$array[$v]['class'].$array[$v]['type'].$array[$v]['function']);
// D::ulli($v.': '.$array[$v]['class'].$array[$v]['type'].$array[$v]['function']);
}
}
self
::
new_echo
(
$param_string
.
"<p><i style=
\"
font-size:10;color:gray;
\"
><b>"
.
$array
[
$i
][
"class"
]
.
$array
[
$i
][
"type"
]
.
$array
[
$i
][
"function"
]
.
"(...)</b> <span title='Rekursionstiefe'>(RT:
$var_depth
)</span> aufgerufen in Zeile "
.
$array
[
$i
][
"line"
]
.
" in Datei <a href=
\"
"
.
substr
(
$array
[
$i
][
"file"
],
strpos
(
$array
[
$i
][
"file"
],
"httpdocs"
)
+
8
)
.
"
\"
>"
.
basename
(
$array
[
$i
][
"file"
])
.
"</a></i> .... [<i style=
\"
font-size:10;color:gray;
\"
>"
.
$array
[
$i
-
1
][
'class'
]
.
$array
[
$i
-
1
][
'type'
]
.
$array
[
$i
-
1
][
'function'
]
.
"(...) aufgerufen in "
.
basename
(
$array
[
$i
-
1
][
"file"
])
.
" Zeile: "
.
$array
[
$i
-
1
][
"line"
]
.
" </i>]</p>
"
);
self
::
new_echo
(
$param_string
.
" <i style=
\"
font-size:10;color:gray;
\"
><b>"
.
$array
[
$i
][
"class"
]
.
$array
[
$i
][
"type"
]
.
$array
[
$i
][
"function"
]
.
"()</b> <span title='Rekursionstiefe'>(RT:
$var_depth
)</span> call in row "
.
$array
[
$i
][
"line"
]
.
" in <a href=
\"
"
.
substr
(
$array
[
$i
][
"file"
],
strpos
(
$array
[
$i
][
"file"
],
"httpdocs"
)
+
8
)
.
"
\"
>"
.
basename
(
$array
[
$i
][
"file"
])
.
"</a></i> => [<i style=
\"
font-size:10;color:gray;
\"
>"
.
$array
[
$i
-
1
][
'class'
]
.
$array
[
$i
-
1
][
'type'
]
.
$array
[
$i
-
1
][
'function'
]
.
"() call in "
.
basename
(
$array
[
$i
-
1
][
"file"
])
.
" Zeile: "
.
$array
[
$i
-
1
][
"line"
]
.
" </i>]
"
);
//echo '___________<pre>';
//echo '___________<pre>';
//echo print_r($array[$i], true);
//echo print_r($array[$i], true);
//echo '</pre>';
//echo '</pre>';
}
}
}
}
}
}
}
public
static
function
backtrace
(
$class
=
null
,
$param_print
=
true
,
$param_force
=
false
)
{
public
static
function
backtrace
(
$class
=
null
,
$param_print
=
true
,
$param_force
=
false
)
{
self
::
printCurrentFunction
(
$param_print
);
self
::
printCurrentFunction
(
$param_print
);
...
...
class_mcArray.inc.php
View file @
6516bde
...
@@ -5,6 +5,40 @@
...
@@ -5,6 +5,40 @@
* SEOLinkCache eingesetzt werden
* SEOLinkCache eingesetzt werden
*/
*/
class
mcArray
{
class
mcArray
{
/**
* check if key path is in array and value is not emtpy array
*
* @param array $param_Array
* @param string $param_key -- $param_Array[$param_key]
* @param string $param_key2 -- $param_Array[$param_key][$param_key2]
* @param string $param_key3 -- $param_Array[$param_key][$param_key2][$param_key3]
* @param string $param_key4 -- $param_Array[$param_key][$param_key2][$param_key3][$param_key4]
* @param string $param_key5 -- $param_Array[$param_key][$param_key2][$param_key3][$param_key4][$param_key5]
* @param string $param_key6 -- $param_Array[$param_key][$param_key2][$param_key3][$param_key4][$param_key5][$param_key6]
* @return bool
*/
public
static
function
checkKeyHasFullArray
(
$param_Array
,
$param_key
,
$param_key2
=
null
,
$param_key3
=
null
,
$param_key4
=
null
,
$param_key5
=
null
,
$param_key6
=
null
)
{
if
(
is_array
(
$param_Array
))
{
if
(
array_key_exists
(
$param_key
,
$param_Array
)
&&
is_array
(
$param_Array
[
$param_key
])
&&
!
empty
(
$param_Array
[
$param_key
])
)
{
if
(
is_null
(
$param_key2
))
{
return
true
;
}
else
{
return
mcArray
::
checkKeyHasFullArray
(
$param_Array
[
$param_key
],
$param_key2
,
$param_key3
,
$param_key4
,
$param_key5
);
}
}
else
{
return
false
;
}
}
else
{
return
false
;
}
}
public
static
function
returnValueFromKeyPath
(
array
$param_PathAsArray
,
array
$param_Array
)
{
public
static
function
returnValueFromKeyPath
(
array
$param_PathAsArray
,
array
$param_Array
)
{
$searcharray
=
$param_Array
;
$searcharray
=
$param_Array
;
foreach
(
$param_PathAsArray
as
$key
)
{
foreach
(
$param_PathAsArray
as
$key
)
{
...
...
config.php
View file @
6516bde
...
@@ -26,6 +26,7 @@ if(!isset($__mc_D_LOGFILE)) {
...
@@ -26,6 +26,7 @@ if(!isset($__mc_D_LOGFILE)) {
* @var string -- file for the D Output
* @var string -- file for the D Output
*/
*/
$__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_SCREENOUTPUT
))
{
if
(
!
isset
(
$__mc_D_SCREENOUTPUT
))
{
...
...
doOnTheEnd.php
View file @
6516bde
...
@@ -19,7 +19,7 @@ if($_LOSP_DEV) {
...
@@ -19,7 +19,7 @@ if($_LOSP_DEV) {
D
::
printToScreen
();
D
::
printToScreen
();
}
}
if
(
$__mc_D_LOGFILE
)
{
if
(
$__mc_D_LOGFILE
)
{
D
::
li
(
$__mc_D_LOGFILE
);
//
D::li($__mc_D_LOGFILE);
D
::
printToFile
(
$__mc_D_LOGFILE
,
'a'
);
D
::
printToFile
(
$__mc_D_LOGFILE
,
'a'
);
}
}
}
}
...
...
doOnTheStart.php
View file @
6516bde
...
@@ -36,16 +36,19 @@ if($_LOSP_DEV) {
...
@@ -36,16 +36,19 @@ if($_LOSP_DEV) {
}
}
}
}
//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
))
{
foreach
(
$__mc_Report
as
$Report
)
{
foreach
(
$__mc_Report
as
$Report
)
{
foreach
(
$Report
as
$kindofDistribute
=>
$params
)
{
foreach
(
$Report
as
$kindofDistribute
=>
$params
)
{
if
(
$kindofDistribute
==
'toFile'
)
{
if
(
$kindofDistribute
==
'toFile'
)
{
if
(
$params
[
'reset'
])
{
if
(
array_key_exists
(
'reset'
,
$params
)
&&
$params
[
'reset'
])
{
unlink
(
$params
[
'file'
]
);
unlink
(
$params
[
'file'
]
);
mcFile
::
write
(
$params
[
'file'
],
$var_message
,
'w'
);
mcFile
::
write
(
$params
[
'file'
],
$var_message
,
'w'
);
}
}
}
}
}
}
}
}
}
D
::
start
();
D
::
start
();
}
}
...
...
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