/** * Render a dump for an object * * @param mixed $data * @param string $name * @access private * @static */ private static function _object(&$data, $name) { echo ' <li class="aprint-child"> <div class="aprint-element' . (count($data) > 0 ? ' aprint-expand' : '') . '"> <a class="aprint-name">' . $name . '</a> (<em class="aprint-type">Object</em>) <strong class="aprint-class">' . get_class($data) . '</strong> </div>'; if (count($data)) { APrint::_vars($data); } echo ' </li>'; }
/** * Wrapper for debugging function dumps arrays/object formatted * * @param array $arr * @param string $prefix * @return string */ function aprint($arr, $prefix = '', $return = false) { if ($return) { return APrint::dump($arr); } else { echo APrint::dump($arr); } }