static function krumo::_array in Devel 6
Same name and namespace in other branches
- 7 krumo/class.krumo.php \krumo::_array()
* Render a dump for an array * *
Parameters
mixed $data: * @param string $name * @access private * @static
1 call to krumo::_array()
- krumo::_dump in krumo/
class.krumo.php - * Dump information about a variable * *
File
- krumo/
class.krumo.php, line 1016
Class
- krumo
- Krumo API
Code
static function _array(&$data, $name) {
?>
<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);">
<?php
/* DEVEL: added htmlSpecialChars */
?>
<a class="krumo-name"><?php
echo htmlSpecialChars($name);
?></a>
(<em class="krumo-type">Array, <strong class="krumo-array-length"><?php
echo count($data) == 1 ? "1 element" : count($data) . " elements";
?></strong></em>)
<?php
// callback ?
//
if (is_callable($data)) {
$_ = array_values($data);
?>
<span class="krumo-callback"> |
(<em class="krumo-type">Callback</em>)
<strong class="krumo-string"><?php
echo htmlSpecialChars($_[0]);
?>::<?php
echo htmlSpecialChars($_[1]);
?>();</strong></span>
<?php
}
?>
</div>
<?php
if (count($data)) {
krumo::_vars($data);
}
?>
</li>
<?php
}