1 <?php
2
3 class Kint_Parsers_SplObjectStorage extends kintParser
4 {
5 protected function _parse( & $variable )
6 {
7 if ( !is_object( $variable ) || !$variable instanceof SplObjectStorage ) return false;
8
9
10
11 $count = $variable->count();
12 if ( $count === 0 ) return false;
13
14 $variable->rewind();
15 while ( $variable->valid() ) {
16 $current = $variable->current();
17 $this->value[] = kintParser::factory( $current );
18 $variable->next();
19 }
20
21 $this->type = 'Storage contents';
22 $this->size = $count;
23 }
24 }