public function parse(&$variable, \Kint\Object $o) { if (!is_object($variable) || !$variable instanceof \SplObjectStorage) { return false; } /* @var $variable SplObjectStorage */ $count = $variable->count(); if ($count === 0) { return false; } $variable->rewind(); while ($variable->valid()) { $current = $variable->current(); $this->value[] = Parser::factory($current); $variable->next(); } $this->type = 'Storage contents'; $this->size = $count; }
private static function _drawHeader(Object $kintVar) { $output = ''; if ($kintVar->access) { $output .= ' ' . $kintVar->access; } if ($kintVar->name !== null && $kintVar->name !== '') { $output .= ' ' . Parser::escape($kintVar->name); } if ($kintVar->operator) { $output .= ' ' . $kintVar->operator; } $output .= ' ' . self::_colorize($kintVar->type, 'type', false); if ($kintVar->size !== null) { $output .= ' (' . $kintVar->size . ')'; } if ($kintVar->value !== null && $kintVar->value !== '') { $output .= ' ' . self::_colorize($kintVar->value, 'value', false); } return ltrim($output); }