function Kint_Parsers_objectIterateable::_parse

Overrides kintParser::_parse

File

kint/kint/parsers/custom/objectiterateable.php, line 5

Class

Kint_Parsers_objectIterateable

Code

protected function _parse(&$variable) {
    if (!KINT_PHP53 || !is_object($variable) || !$variable instanceof Traversable || stripos(get_class($variable), 'zend') !== false) {
        return false;
    }
    $arrayCopy = iterator_to_array($variable, true);
    if ($arrayCopy === false) {
        return false;
    }
    $this->value = kintParser::factory($arrayCopy)->extendedValue;
    $this->type = 'Iterator contents';
    $this->size = count($arrayCopy);
}