_object() private static method

Render a dump for an object
private static _object ( mixed &$data, string $name )
$data mixed
$name string
Ejemplo n.º 1
0
 /**
  * Dump information about a variable
  *
  * @param mixed $data
  * @param string $name
  * @access private
  * @static
  */
 private static function _dump(&$data, $name = '…')
 {
     // Highlight elements that have a space in their name.
     // Spaces are hard to see in the HTML and are hard to troubleshoot
     $name = Krumo::sanitize_name($name);
     // object
     if (is_object($data)) {
         return Krumo::_object($data, $name);
     }
     // array
     if (is_array($data)) {
         return Krumo::_array($data, $name);
     }
     // resource
     if (is_resource($data)) {
         return Krumo::_resource($data, $name);
     }
     // scalar
     if (is_string($data)) {
         return Krumo::_string($data, $name);
     }
     // float
     if (is_float($data)) {
         return Krumo::_float($data, $name);
     }
     // integer
     if (is_integer($data)) {
         return Krumo::_integer($data, $name);
     }
     // boolean
     if (is_bool($data)) {
         return Krumo::_boolean($data, $name);
     }
     // null
     if (is_null($data)) {
         return Krumo::_null($name);
     }
 }