private static function kintParser::_parse_resource in Devel 8
Same name and namespace in other branches
- 8.2 kint/kint/inc/kintParser.class.php \kintParser::_parse_resource()
File
- kint/
kint/ inc/ kintParser.class.php, line 538
Class
Code
private static function _parse_resource(&$variable, kintVariableData $variableData) {
$resourceType = get_resource_type($variable);
$variableData->type = "resource ({$resourceType})";
if ($resourceType === 'stream' && ($meta = stream_get_meta_data($variable))) {
if (isset($meta['uri'])) {
$file = $meta['uri'];
if (function_exists('stream_is_local')) {
// Only exists on PHP >= 5.2.4
if (stream_is_local($file)) {
$file = Kint::shortenPath($file);
}
}
$variableData->value = $file;
}
}
}