updated devel
This commit is contained in:
Executable → Regular
+42
-36
@@ -655,6 +655,15 @@ This is a list of all the values from the <code><b><?php echo realpath($ini_file
|
||||
|
||||
// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
|
||||
/**
|
||||
* Allows CSS and Javascript to be included without performing a krumo::dump().
|
||||
*/
|
||||
Public Static Function addCssJs() {
|
||||
return krumo::_css();
|
||||
}
|
||||
|
||||
// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
|
||||
/**
|
||||
* Print the skin (CSS)
|
||||
*
|
||||
@@ -674,7 +683,7 @@ This is a list of all the values from the <code><b><?php echo realpath($ini_file
|
||||
|
||||
$css = '';
|
||||
// DEVEL: changed for Drupal variables system
|
||||
$skin = variable_get('devel_krumo_skin', 'orange');
|
||||
$skin = variable_get('devel_krumo_skin', 'default');
|
||||
|
||||
// custom selected skin ?
|
||||
//
|
||||
@@ -705,25 +714,8 @@ This is a list of all the values from the <code><b><?php echo realpath($ini_file
|
||||
|
||||
// the CSS
|
||||
//
|
||||
?>
|
||||
<!-- Using Krumo Skin: <?php echo preg_replace('~^' . preg_quote(realpath(KRUMO_DIR) . DIRECTORY_SEPARATOR) . '~Uis', '', realpath($_));?> -->
|
||||
<style type="text/css">
|
||||
<!--/**/
|
||||
<?php echo $css?>
|
||||
|
||||
/**/-->
|
||||
</style>
|
||||
<?php
|
||||
// the JS
|
||||
//
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<!--//
|
||||
<?php echo join(file(KRUMO_DIR . "krumo.js"));?>
|
||||
|
||||
//-->
|
||||
</script>
|
||||
<?php
|
||||
drupal_add_css($css, 'inline');
|
||||
drupal_add_js(join(file(KRUMO_DIR . "krumo.js")), 'inline');
|
||||
}
|
||||
|
||||
return $_css;
|
||||
@@ -924,7 +916,7 @@ This is a list of all the values from the <code><b><?php echo realpath($ini_file
|
||||
//
|
||||
$_recursion_marker = krumo::_marker();
|
||||
(is_object($bee))
|
||||
? @($bee->$_recursion_marker++)
|
||||
? (empty($bee->$_recursion_marker) ? ($bee->$_recursion_marker = 1) : $bee->$_recursion_marker++)
|
||||
: @($bee[$_recursion_marker]++);
|
||||
|
||||
$_[0][] =& $bee;
|
||||
@@ -974,6 +966,29 @@ This is a list of all the values from the <code><b><?php echo realpath($ini_file
|
||||
<ul class="krumo-node">
|
||||
<?php
|
||||
|
||||
if ($_is_object && get_class($data) != 'stdClass') {
|
||||
// this part for protected/private properties only
|
||||
$refl = new ReflectionClass($data);
|
||||
foreach ($refl->getProperties() as $property) {
|
||||
$k = $property->getName();
|
||||
if ($k === $_recursion_marker || $property->isPublic()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// add key indicators
|
||||
if ($property->isProtected()) {
|
||||
$k .= ':protected';
|
||||
}
|
||||
elseif ($property->isPrivate()) {
|
||||
$k .= ':private';
|
||||
}
|
||||
|
||||
$property->setAccessible(TRUE);
|
||||
$v = $property->getValue($data);
|
||||
krumo::_dump($v, $k);
|
||||
}
|
||||
}
|
||||
|
||||
// keys ?
|
||||
//
|
||||
$keys = ($_is_object)
|
||||
@@ -1021,7 +1036,7 @@ This is a list of all the values from the <code><b><?php echo realpath($ini_file
|
||||
<div class="krumo-element"
|
||||
onMouseOver="krumo.over(this);"
|
||||
onMouseOut="krumo.out(this);">
|
||||
<a class="krumo-name"><big>∞</big></a>
|
||||
<a class="krumo-name"><span class="krumo-big">∞</span></a>
|
||||
(<em class="krumo-type">Recursion</em>)
|
||||
</div>
|
||||
|
||||
@@ -1045,10 +1060,7 @@ This is a list of all the values from the <code><b><?php echo realpath($ini_file
|
||||
?>
|
||||
<li class="krumo-child">
|
||||
|
||||
<div class="krumo-element<?php echo count($data) > 0 ? ' krumo-expand' : '';?>"
|
||||
<?php if (count($data) > 0) {?> onClick="krumo.toggle(this);"<?php } ?>
|
||||
onMouseOver="krumo.over(this);"
|
||||
onMouseOut="krumo.out(this);">
|
||||
<div class="krumo-element<?php echo !empty($data) ? ' krumo-expand' : '';?>">
|
||||
|
||||
<?php /* DEVEL: added htmlSpecialChars */ ?>
|
||||
<a class="krumo-name"><?php echo htmlSpecialChars($name);?></a>
|
||||
@@ -1097,10 +1109,7 @@ This is a list of all the values from the <code><b><?php echo realpath($ini_file
|
||||
?>
|
||||
<li class="krumo-child">
|
||||
|
||||
<div class="krumo-element<?php echo count($data) > 0 ? ' krumo-expand' : '';?>"
|
||||
<?php if (count($data) > 0) {?> onClick="krumo.toggle(this);"<?php } ?>
|
||||
onMouseOver="krumo.over(this);"
|
||||
onMouseOut="krumo.out(this);">
|
||||
<div class="krumo-element<?php echo ' krumo-expand';?>">
|
||||
|
||||
<?php /* DEVEL: added htmlSpecialChars */ ?>
|
||||
<a class="krumo-name"><?php echo htmlSpecialChars($name);?></a>
|
||||
@@ -1108,7 +1117,7 @@ This is a list of all the values from the <code><b><?php echo realpath($ini_file
|
||||
<strong class="krumo-class"><?php echo get_class($data);?></strong>
|
||||
</div>
|
||||
|
||||
<?php if (count($data)) {
|
||||
<?php {
|
||||
krumo::_vars($data);
|
||||
} ?>
|
||||
</li>
|
||||
@@ -1244,16 +1253,13 @@ This is a list of all the values from the <code><b><?php echo realpath($ini_file
|
||||
$_extra = false;
|
||||
$_ = $data;
|
||||
if (strLen($data) > KRUMO_TRUNCATE_LENGTH) {
|
||||
$_ = substr($data, 0, KRUMO_TRUNCATE_LENGTH - 3) . '...';
|
||||
$_ = drupal_substr($data, 0, KRUMO_TRUNCATE_LENGTH - 3) . '...';
|
||||
$_extra = true;
|
||||
}
|
||||
?>
|
||||
<li class="krumo-child">
|
||||
|
||||
<div class="krumo-element<?php echo $_extra ? ' krumo-expand' : '';?>"
|
||||
<?php if ($_extra) {?> onClick="krumo.toggle(this);"<?php } ?>
|
||||
onMouseOver="krumo.over(this);"
|
||||
onMouseOut="krumo.out(this);">
|
||||
<div class="krumo-element<?php echo $_extra ? ' krumo-expand' : '';?>">
|
||||
|
||||
<?php /* DEVEL: added htmlSpecialChars */ ?>
|
||||
<a class="krumo-name"><?php echo htmlSpecialChars($name);?></a>
|
||||
|
||||
Reference in New Issue
Block a user