Exemple #1
0
 public function transplant(Kint_Object $new)
 {
     $new = parent::transplant($new);
     $new->classname = $this->classname;
     $new->hash = $this->hash;
     $new->filename = $this->filename;
     $new->startline = $this->startline;
     return $new;
 }
Exemple #2
0
 private function parseResource(&$var, Kint_Object $o)
 {
     $resource = $o->transplant(new Kint_Object_Resource());
     $resource->resource_type = get_resource_type($var);
     if ($resource->resource_type === 'stream' && ($meta = stream_get_meta_data($var))) {
         if (isset($meta['uri'])) {
             $file = $meta['uri'];
             if (stream_is_local($file)) {
                 $file = Kint::shortenPath($file);
             }
             $rep = new Kint_Object_Representation('Stream');
             $rep->contents = $file;
             $resource->addRepresentation($rep);
         }
     }
     return $resource;
 }