69da91fd9eed11f3033a1062fd6e68f48bcbf4c3
[yaffs-website] / web / modules / contrib / devel / kint / kint / parsers / custom / splobjectstorage.php
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                 /** @var $variable SplObjectStorage */
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 }