resource_type) { return; } // Doublecheck that the resource is open before we get the metadata if (!\is_resource($var)) { return; } $meta = \stream_get_meta_data($var); $rep = new Representation('Stream'); $rep->implicit_label = true; $base_obj = new Value(); $base_obj->depth = $o->depth; if ($o->access_path) { $base_obj->access_path = 'stream_get_meta_data('.$o->access_path.')'; } $rep->contents = $this->parser->parse($meta, $base_obj); if (!\in_array('depth_limit', $rep->contents->hints, true)) { $rep->contents = $rep->contents->value->contents; } $o->addRepresentation($rep, 0); $o->value = $rep; $stream = new StreamValue($meta); $stream->transplant($o); $o = $stream; } }