addRepresentation example

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;
    }
}
if ($o->access_path) {
            $base_obj->access_path = 'json_decode('.$o->access_path.', true)';
        }

        $r = new Representation('Json');
        $r->contents = $this->parser->parse($json$base_obj);

        if (!\in_array('depth_limit', $r->contents->hints, true)) {
            $r->contents = $r->contents->value->contents;
        }

        $o->addRepresentation($r, 0);
    }
}
if (isset($this->trace['args'][$param->position])) {
                            $this->trace['args'][$param->position]->name = $param->getName();
                        }
                    }
                }
            }
        }

        $this->clearRepresentations();

        if (isset($this->trace['file']$this->trace['line']) && \is_readable($this->trace['file'])) {
            $this->addRepresentation(new SourceRepresentation($this->trace['file']$this->trace['line']));
        }

        if ($this->trace['args']) {
            $args = new Representation('Arguments');
            $args->contents = $this->trace['args'];
            $this->addRepresentation($args);
        }

        if ($this->trace['object']) {
            $callee = new Representation('object');
            $callee->label = 'Callee object ['.$this->trace['object']->classname.']';
            


        $r = new Representation('Serialized');

        if (isset($data)) {
            $r->contents = $this->parser->parse($data$base_obj);
        } else {
            $base_obj->hints[] = 'blacklist';
            $r->contents = $base_obj;
        }

        $o->addRepresentation($r, 0);
    }
}
if (null !== $lap) {
            $total = $time - self::$start;
            $r = new MicrotimeRepresentation($sec$usec, self::$group$lap$total, self::$times);
        } else {
            $r = new MicrotimeRepresentation($sec$usec, self::$group);
        }
        $r->contents = $var;
        $r->implicit_label = true;

        $o->removeRepresentation($o->value);
        $o->addRepresentation($r);
        $o->hints[] = 'microtime';
    }

    public static function clean(): void
    {
        self::$last = null;
        self::$start = null;
        self::$times = 0;
        ++self::$group;
    }
}
if (empty($childarray->value->contents)) {
                return;
            }
        }

        // Objects by reference for the win! We can do a copy-paste of the value         // representation contents and just slap a new hint on there and hey         // presto we have our table representation with no extra memory used!         $table = new Representation('Table');
        $table->contents = $o->value->contents;
        $table->hints[] = 'table';
        $o->addRepresentation($table, 0);
    }
}
$o = self::textualNodeToString($o);

            return;
        }

        // Set the attributes         if ($attributes) {
            $a = new Representation('Attributes');
            foreach ($attributes->contents as $attribute) {
                $a->contents[] = $attribute;
            }
            $o->addRepresentation($a, 0);
        }

        // Set the children         if ($childNodes) {
            $c = new Representation('Children');

            if (1 === \count($childNodes->contents) && ($node = \reset($childNodes->contents)) && \in_array('depth_limit', $node->hints, true)) {
                $n = new InstanceValue();
                $n->transplant($node);
                $n->name = 'childNodes';
                $n->classname = 'DOMNodeList';
                
$closure = new ReflectionFunction($var);

        $o->filename = $closure->getFileName();
        $o->startline = $closure->getStartLine();

        foreach ($closure->getParameters() as $param) {
            $o->parameters[] = new ParameterValue($param);
        }

        $p = new Representation('Parameters');
        $p->contents = &$o->parameters;
        $o->addRepresentation($p, 0);

        $statics = [];

        if ($v = $closure->getClosureThis()) {
            $statics = ['this' => $v];
        }

        if (\count($statics = $statics + $closure->getStaticVariables())) {
            $statics_parsed = [];

            foreach ($statics as $name => &$static) {
                
foreach (self::$blacklist as $class) {
            if ($var instanceof $class) {
                $b = new Value();
                $b->name = $class.' Iterator Contents';
                $b->access_path = 'iterator_to_array('.$o->access_path.', true)';
                $b->depth = $o->depth + 1;
                $b->hints[] = 'blacklist';

                $r = new Representation('Iterator');
                $r->contents = [$b];

                $o->addRepresentation($r);

                return;
            }
        }

        $data = \iterator_to_array($var);

        $base_obj = new Value();
        $base_obj->depth = $o->depth;

        if ($o->access_path) {
            

                }
            }

            $rep->contents[$index] = new TraceFrameValue($frame$trace[$index]);
        }

        \ksort($rep->contents);
        $rep->contents = \array_values($rep->contents);

        $traceobj->clearRepresentations();
        $traceobj->addRepresentation($rep);
        $traceobj->size = \count($rep->contents);
        $o = $traceobj;
    }

    protected static function normalizePaths(array $paths): array
    {
        $normalized = [];

        foreach ($paths as $path) {
            $realpath = \realpath($path);
            if (\is_dir($realpath)) {
                
 else {
                    $cases->contents[] = $base_obj;
                }
            }

            self::$cache[$class] = $cases;
        }

        $object = new EnumValue($var);
        $object->transplant($o);

        $object->addRepresentation(self::$cache[$class], 0);

        $o = $object;
    }
}


                if ($method->owner_class !== $class && $d = $method->getRepresentation('method_definition')) {
                    $d = clone $d;
                    $d->inherited = true;
                    $method->replaceRepresentation($d);
                }

                $rep->contents[] = $method;
            }

            $o->addRepresentation($rep);
        }
    }

    private static function sort(MethodValue $a, MethodValue $b): int
    {
        $sort = ((int) $a->static) - ((int) $b->static);
        if ($sort) {
            return $sort;
        }

        $sort = Value::sortByAccess($a$b);
        
$static = $static->getValue();
                $statics->contents[] = $this->parser->parse($static$prop);
            }
        }

        if (empty($statics->contents)) {
            return;
        }

        \usort($statics->contents, ['Kint\\Parser\\ClassStaticsPlugin', 'sort']);

        $o->addRepresentation($statics);
    }

    private static function sort(Value $a, Value $b): int
    {
        $sort = ((int) $a->const) - ((int) $b->const);
        if ($sort) {
            return $sort;
        }

        $sort = Value::sortByAccess($a$b);
        if ($sort) {
            


        foreach (self::$blacklist as $class) {
            if ($var instanceof $class) {
                return;
            }
        }

        $r = new Representation('toString');
        $r->contents = (string) $var;

        $o->addRepresentation($r);
    }
}


        return true;
    }

    public function replaceRepresentation(Representation $rep, ?int $pos = null): void
    {
        if (null === $pos) {
            $this->representations[$rep->getName()] = $rep;
        } else {
            $this->removeRepresentation($rep);
            $this->addRepresentation($rep$pos);
        }
    }

    /** * @param Representation|string $rep */
    public function removeRepresentation($rep): void
    {
        if ($rep instanceof Representation) {
            unset($this->representations[$rep->getName()]);
        } else { // String
Home | Imprint | This part of the site doesn't use cookies.