/class/libraries/vendor/raveren/kint/parsers/custom/splobjectstorage.php
https://gitlab.com/VoyaTrax/vtCMS2 · PHP · 24 lines · 18 code · 5 blank · 1 comment · 4 complexity · 5ffe5f2b51469f89957ea9ce33f4c21d MD5 · raw file
- <?php
- class Kint_Parsers_SplObjectStorage extends kintParser
- {
- protected function _parse( & $variable )
- {
- 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[] = kintParser::factory( $current );
- $variable->next();
- }
- $this->type = 'Storage contents';
- $this->size = $count;
- }
- }