You are here

private static function krumo::_array in Devel 7

Same name and namespace in other branches
  1. 6 krumo/class.krumo.php \krumo::_array()

Render a dump for an array

@access private @static

Parameters

mixed $data:

string $name:

1 call to krumo::_array()
krumo::_dump in krumo/class.krumo.php
Dump information about a variable

File

krumo/class.krumo.php, line 1059

Class

krumo
Krumo API

Code

private static function _array(&$data, $name) {
  ?>
<li class="krumo-child">

  <div class="krumo-element<?php

  echo !empty($data) ? ' krumo-expand' : '';
  ?>">

      <?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 !is_object($_[0]) ? htmlSpecialChars($_[0]) : get_class($_[0]);
    ?>::<?php

    echo !is_object($_[1]) ? htmlSpecialChars($_[1]) : get_class($_[1]);
    ?>();</strong></span>
        <?php

  }
  ?>

  </div>

  <?php

  if (count($data)) {
    krumo::_vars($data);
  }
  ?>
</li>
<?php

}