‪TYPO3CMS  10.4
DebuggerUtility.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
33 
41 {
42  const ‪PLAINTEXT_INDENT = ' ';
43  const ‪HTML_INDENT = '&nbsp;&nbsp;&nbsp;';
44 
48  protected static ‪$renderedObjects;
49 
55  protected static ‪$blacklistedClassNames = [
56  'PHPUnit_Framework_MockObject_InvocationMocker',
57  ReflectionService::class,
58  ObjectManager::class,
59  DataMapper::class,
60  PersistenceManager::class,
61  QueryObjectModelFactory::class,
62  ContentObjectRenderer::class
63  ];
64 
70  protected static ‪$blacklistedPropertyNames = ['warning'];
71 
77  protected static ‪$stylesheetEchoed = false;
78 
84  protected static ‪$maxDepth = 8;
85 
89  protected static function ‪clearState(): void
90  {
91  self::$renderedObjects = new ‪ObjectStorage();
92  }
93 
103  protected static function ‪renderDump($value, int $level, bool $plainText, bool $ansiColors): string
104  {
105  $dump = '';
106  if (is_string($value)) {
107  $croppedValue = strlen($value) > 2000 ? substr($value, 0, 2000) . '...' : $value;
108  if ($plainText) {
109  $dump = ‪self::ansiEscapeWrap('"' . implode(PHP_EOL . str_repeat(self::PLAINTEXT_INDENT, $level + 1), str_split($croppedValue, 76)) . '"', '33', $ansiColors) . ' (' . strlen($value) . ' chars)';
110  } else {
111  $lines = str_split($croppedValue, 76);
112  $lines = array_map(static function (string $line): string {
113  return htmlspecialchars($line, ENT_COMPAT);
114  }, $lines);
115  $dump = sprintf('\'<span class="extbase-debug-string">%s</span>\' (%s chars)', implode('<br />' . str_repeat(self::HTML_INDENT, $level + 1), $lines), strlen($value));
116  }
117  } elseif (is_numeric($value)) {
118  $dump = sprintf('%s (%s)', self::ansiEscapeWrap((string)$value, '35', $ansiColors), gettype($value));
119  } elseif (is_bool($value)) {
120  $dump = $value ? ‪self::ansiEscapeWrap('TRUE', '32', $ansiColors) : self::‪ansiEscapeWrap('FALSE', '32', $ansiColors);
121  } elseif ($value === null || is_resource($value)) {
122  $dump = gettype($value);
123  } elseif (is_array($value)) {
124  $dump = ‪self::renderArray($value, $level + 1, $plainText, $ansiColors);
125  } elseif (is_object($value)) {
126  if ($value instanceof \Closure) {
127  $dump = ‪self::renderClosure($value, $level + 1, $plainText, $ansiColors);
128  } else {
129  $dump = ‪self::renderObject($value, $level + 1, $plainText, $ansiColors);
130  }
131  }
132  return $dump;
133  }
134 
144  protected static function ‪renderArray(array $array, int $level, bool $plainText = false, bool $ansiColors = false): string
145  {
146  $content = '';
147  $count = count($array);
148 
149  if ($plainText) {
150  $header = ‪self::ansiEscapeWrap('array', '36', $ansiColors);
151  } else {
152  $header = '<span class="extbase-debug-type">array</span>';
153  }
154  $header .= $count > 0 ? '(' . $count . ' item' . ($count > 1 ? 's' : '') . ')' : '(empty)';
155  if ($level >= self::$maxDepth) {
156  if ($plainText) {
157  $header .= ' ' . ‪self::ansiEscapeWrap('max depth', '47;30', $ansiColors);
158  } else {
159  $header .= '<span class="extbase-debug-filtered">max depth</span>';
160  }
161  } else {
162  $content = ‪self::renderCollection($array, $level, $plainText, $ansiColors);
163  if (!$plainText) {
164  $header = ($level > 1 && $count > 0 ? '<input type="checkbox" /><span class="extbase-debug-header" >' : '<span>') . $header . '</span >';
165  }
166  }
167  if ($level > 1 && $count > 0 && !$plainText) {
168  $dump = '<span class="extbase-debugger-tree">' . $header . '<span class="extbase-debug-content">' . $content . '</span></span>';
169  } else {
170  $dump = $header . $content;
171  }
172  return $dump;
173  }
174 
184  protected static function ‪renderObject(object $object, int $level, bool $plainText = false, bool $ansiColors = false): string
185  {
186  if ($object instanceof LazyLoadingProxy) {
187  $object = $object->_loadRealInstance();
188  if (!is_object($object)) {
189  return gettype($object);
190  }
191  }
192  $header = ‪self::renderHeader($object, $level, $plainText, $ansiColors);
193  if ($level < self::$maxDepth && !self::isBlacklisted($object) && !(self::isAlreadyRendered($object) && $plainText !== true)) {
194  $content = ‪self::renderContent($object, $level, $plainText, $ansiColors);
195  } else {
196  $content = '';
197  }
198  if ($plainText) {
199  return $header . $content;
200  }
201  return '<span class="extbase-debugger-tree">' . $header . '<span class="extbase-debug-content">' . $content . '</span></span>';
202  }
203 
213  protected static function ‪renderClosure(\Closure $object, int $level, bool $plainText = false, bool $ansiColors = false): string
214  {
215  $header = ‪self::renderHeader($object, $level, $plainText, $ansiColors);
216  if ($level < self::$maxDepth && (!self::isAlreadyRendered($object) || $plainText)) {
217  $content = ‪self::renderContent($object, $level, $plainText, $ansiColors);
218  } else {
219  $content = '';
220  }
221  if ($plainText) {
222  return $header . $content;
223  }
224  return '<span class="extbase-debugger-tree"><input type="checkbox" /><span class="extbase-debug-header">' . $header . '</span><span class="extbase-debug-content">' . $content . '</span></span>';
225  }
226 
233  protected static function ‪isBlacklisted(object $value): bool
234  {
235  if ($value instanceof \ReflectionProperty) {
236  $result = in_array($value->getName(), self::$blacklistedPropertyNames, true);
237  } else {
238  $result = in_array(get_class($value), self::$blacklistedClassNames, true);
239  }
240  return $result;
241  }
242 
249  protected static function ‪isAlreadyRendered(object $object): bool
250  {
251  return self::$renderedObjects->contains($object);
252  }
253 
263  protected static function ‪renderHeader(object $object, int $level, bool $plainText, bool $ansiColors): string
264  {
265  $dump = '';
266  $persistenceType = null;
267  $className = get_class($object);
268  $classReflection = new \ReflectionClass($className);
269  if ($plainText) {
270  $dump .= ‪self::ansiEscapeWrap($className, '36', $ansiColors);
271  } else {
272  $dump .= '<span class="extbase-debug-type">' . htmlspecialchars($className, ENT_COMPAT) . '</span>';
273  }
274  if (!$object instanceof \Closure) {
275  if ($object instanceof SingletonInterface) {
276  $scope = 'singleton';
277  } else {
278  $scope = 'prototype';
279  }
280  if ($plainText) {
281  $dump .= ' ' . ‪self::ansiEscapeWrap($scope, '44;37', $ansiColors);
282  } else {
283  $dump .= '<span class="extbase-debug-scope">' . $scope . '</span>';
284  }
285  if ($object instanceof AbstractDomainObject) {
286  if ($object->_isDirty()) {
287  $persistenceType = 'modified';
288  } elseif ($object->_isNew()) {
289  $persistenceType = 'transient';
290  } else {
291  $persistenceType = 'persistent';
292  }
293  }
294  if ($object instanceof ObjectStorage && $object->_isDirty()) {
295  $persistenceType = 'modified';
296  }
297  if ($object instanceof AbstractEntity) {
298  $domainObjectType = 'entity';
299  } elseif ($object instanceof AbstractValueObject) {
300  $domainObjectType = 'valueobject';
301  } else {
302  $domainObjectType = 'object';
303  }
304  $persistenceType = $persistenceType === null ? '' : $persistenceType . ' ';
305  if ($plainText) {
306  $dump .= ' ' . ‪self::ansiEscapeWrap($persistenceType . $domainObjectType, '42;30', $ansiColors);
307  } else {
308  $dump .= '<span class="extbase-debug-ptype">' . $persistenceType . $domainObjectType . '</span>';
309  }
310  }
311  if (strpos(implode('|', self::$blacklistedClassNames), get_class($object)) > 0) {
312  if ($plainText) {
313  $dump .= ' ' . ‪self::ansiEscapeWrap('filtered', '47;30', $ansiColors);
314  } else {
315  $dump .= '<span class="extbase-debug-filtered">filtered</span>';
316  }
317  } elseif (self::$renderedObjects->contains($object) && !$plainText) {
318  $dump = '<a href="javascript:;" onclick="document.location.hash=\'#' . spl_object_hash($object) . '\';" class="extbase-‪debug-seeabove">' . $dump . '<span class="extbase-‪debug-filtered">see above</span></a>';
319  } elseif ($level >= self::$maxDepth && !$object instanceof \DateTimeInterface) {
320  if ($plainText) {
321  $dump .= ' ' . self::ansiEscapeWrap('max depth', '47;30', $ansiColors);
322  } else {
323  $dump .= '<span class="extbase-‪debug-filtered">max depth</span>';
324  }
325  } elseif ($level > 1 && !$object instanceof \DateTimeInterface && !$plainText) {
326  if (($object instanceof \Countable && empty($object)) || empty($classReflection->getProperties())) {
327  $dump = '<span>' . $dump . '</span>';
328  } else {
329  $dump = '<input type="checkbox" id="' . spl_object_hash($object) . '" /><span class="extbase-‪debug-header">' . $dump . '</span>';
330  }
331  }
332  if ($object instanceof \Countable) {
333  $objectCount = count($object);
334  $dump .= $objectCount > 0 ? ' (' . $objectCount . ' items)' : ' (empty)';
335  }
336  if ($object instanceof \DateTimeInterface) {
337  $dump .= ' (' . $object->format(\DateTimeInterface::RFC3339) . ', ' . $object->getTimestamp() . ')';
338  }
339  if ($object instanceof DomainObjectInterface && !$object->_isNew()) {
340  $dump .= ' (uid=' . $object->getUid() . ', pid=' . $object->getPid() . ')';
341  }
342  return $dump;
343  }
344 
352  protected static function renderContent(object $object, int $level, bool $plainText, bool $ansiColors): string
353  {
354  $dump = '';
355  if ($object instanceof \Iterator || $object instanceof \ArrayObject) {
356  $dump .= self::renderCollection($object, $level, $plainText, $ansiColors);
357  } else {
358  self::$renderedObjects->attach($object);
359  if (!$plainText) {
360  $dump .= '<a name="' . spl_object_hash($object) . '" id="' . spl_object_hash($object) . '"></a>';
361  }
362  if ($object instanceof \Closure) {
363  $dump .= PHP_EOL . str_repeat(self::PLAINTEXT_INDENT, $level)
364  . ($plainText ? '' : '<span class="extbase-‪debug-closure">')
365  . self::ansiEscapeWrap('function (', '33', $ansiColors) . ($plainText ? '' : '</span>');
366 
367  $reflectionFunction = new \ReflectionFunction($object);
368  $params = [];
369  foreach ($reflectionFunction->getParameters() as $parameter) {
370  $parameterDump = '';
371  if ($parameter->isArray()) {
372  if ($plainText) {
373  $parameterDump .= self::ansiEscapeWrap('array ', '36', $ansiColors);
374  } else {
375  $parameterDump .= '<span class="extbase-‪debug-type">array </span>';
376  }
377  } elseif ($parameter->getClass() instanceof \ReflectionClass) {
378  if ($plainText) {
379  $parameterDump .= self::ansiEscapeWrap($parameter->getClass()->name . ' ', '36', $ansiColors);
380  } else {
381  $parameterDump .= '<span class="extbase-‪debug-type">'
382  . htmlspecialchars($parameter->getClass()->name, ENT_COMPAT) . '</span>';
383  }
384  }
385  if ($parameter->isPassedByReference()) {
386  $parameterDump .= '&';
387  }
388  if ($parameter->isVariadic()) {
389  $parameterDump .= '...';
390  }
391  if ($plainText) {
392  $parameterDump .= self::ansiEscapeWrap('$' . $parameter->name, '37', $ansiColors);
393  } else {
394  $parameterDump .= '<span class="extbase-‪debug-property">'
395  . htmlspecialchars('$' . $parameter->name, ENT_COMPAT) . '</span>';
396  }
397  if ($parameter->isDefaultValueAvailable()) {
398  $parameterDump .= ' = ';
399  if ($plainText) {
400  $parameterDump .= self::ansiEscapeWrap(var_export($parameter->getDefaultValue(), true), '33', $ansiColors);
401  } else {
402  $parameterDump .= '<span class="extbase-‪debug-string">'
403  . htmlspecialchars(var_export($parameter->getDefaultValue(), true), ENT_COMPAT) . '</span>';
404  }
405  }
406  $params[] = $parameterDump;
407  }
408  $dump .= implode(', ', $params);
409  if ($plainText) {
410  $dump .= self::ansiEscapeWrap(') {' . PHP_EOL, '33', $ansiColors);
411  } else {
412  $dump .= '<span class="extbase-‪debug-closure">) {' . PHP_EOL . '</span>';
413  }
414  $lines = (array)file((string)$reflectionFunction->getFileName());
415  for ($l = (int)$reflectionFunction->getStartLine(); $l < (int)$reflectionFunction->getEndLine() - 1; ++$l) {
416  $line = (string)($lines[$l] ?? '');
417  $dump .= $plainText ? $line : htmlspecialchars($line, ENT_COMPAT);
418  }
419  $dump .= str_repeat(self::PLAINTEXT_INDENT, $level);
420  if ($plainText) {
421  $dump .= self::ansiEscapeWrap('}' . PHP_EOL, '33', $ansiColors);
422  } else {
423  $dump .= '<span class="extbase-‪debug-closure">}</span>';
424  }
425  } else {
426  if (get_class($object) === \stdClass::class) {
427  $objReflection = new \ReflectionObject($object);
428  $properties = $objReflection->getProperties();
429  } else {
430  $classReflection = new \ReflectionClass(get_class($object));
431  $properties = $classReflection->getProperties();
432  }
433  foreach ($properties as $property) {
434  if (self::isBlacklisted($property)) {
435  continue;
436  }
437  $dump .= PHP_EOL . str_repeat(self::PLAINTEXT_INDENT, $level);
438  if ($plainText) {
439  $dump .= self::ansiEscapeWrap($property->getName(), '37', $ansiColors);
440  } else {
441  $dump .= '<span class="extbase-‪debug-property">'
442  . htmlspecialchars($property->getName(), ENT_COMPAT) . '</span>';
443  }
444  $dump .= ' => ';
445  $property->setAccessible(true);
446  $visibility = ($property->isProtected() ? 'protected' : ($property->isPrivate() ? 'private' : 'public'));
447  if ($plainText) {
448  $dump .= self::ansiEscapeWrap($visibility, '42;30', $ansiColors) . ' ';
449  } else {
450  $dump .= '<span class="extbase-‪debug-visibility">' . $visibility . '</span>';
451  }
452  $dump .= self::renderDump($property->getValue($object), $level, $plainText, $ansiColors);
453  if ($object instanceof AbstractDomainObject && !$object->_isNew() && $object->_isDirty($property->getName())) {
454  if ($plainText) {
455  $dump .= ' ' . self::ansiEscapeWrap('modified', '43;30', $ansiColors);
456  } else {
457  $dump .= '<span class="extbase-‪debug-dirty">modified</span>';
458  }
459  }
460  }
461  }
462  }
463  return $dump;
464  }
465 
473  protected static function renderCollection(iterable $collection, int $level, bool $plainText, bool $ansiColors): string
474  {
475  $dump = '';
476  foreach ($collection as $key => $value) {
477  $key = (string)$key;
478 
479  $dump .= PHP_EOL . str_repeat(self::PLAINTEXT_INDENT, $level);
480  if ($plainText) {
481  $dump .= self::ansiEscapeWrap($key, '37', $ansiColors);
482  } else {
483  $dump .= '<span class="extbase-‪debug-property">' . htmlspecialchars($key, ENT_COMPAT) . '</span>';
484  }
485  $dump .= ' => ';
486  $dump .= self::renderDump($value, $level, $plainText, $ansiColors);
487  }
488  if ($collection instanceof \Iterator && !$collection instanceof \Generator) {
489  $collection->rewind();
490  }
491  return $dump;
492  }
493 
502  protected static function ansiEscapeWrap(string $string, string $ansiColors, bool $enable = true): string
503  {
504  if ($enable) {
505  return '[' . $ansiColors . 'm' . $string . '';
506  }
507  return $string;
508  }
509 
523  public static function var_dump(
524  $variable,
525  string $title = null,
526  int $maxDepth = 8,
527  bool $plainText = false,
528  bool $ansiColors = true,
529  bool $return = false,
530  array $blacklistedClassNames = null,
531  array $blacklistedPropertyNames = null
532  ): string {
533  self::$maxDepth = $maxDepth;
534  if ($title === null) {
535  $title = 'Extbase Variable Dump';
536  }
537  $ansiColors = $plainText && $ansiColors;
538  if ($ansiColors === true) {
539  $title = '' . $title . '';
540  }
541  $backupBlacklistedClassNames = self::$blacklistedClassNames;
542  if (is_array($blacklistedClassNames)) {
543  self::$blacklistedClassNames = $blacklistedClassNames;
544  }
545  $backupBlacklistedPropertyNames = self::$blacklistedPropertyNames;
546  if (is_array($blacklistedPropertyNames)) {
547  self::$blacklistedPropertyNames = $blacklistedPropertyNames;
548  }
549  self::clearState();
550  $css = '';
551  if (!$plainText && self::$stylesheetEchoed === false) {
552  $css = '
553  <style type=\'text/css\'>
554  .extbase-debugger-tree{position:relative}
555  .extbase-debugger-tree input{position:absolute !important;float: none !important;top:0;left:0;height:14px;width:14px;margin:0 !important;cursor:pointer;opacity:0;z-index:2}
556  .extbase-debugger-tree input~.extbase-debug-content{display:none}
557  .extbase-debugger-tree .extbase-debug-header:before{position:relative;top:3px;content:"";padding:0;line-height:10px;height:12px;width:12px;text-align:center;margin:0 3px 0 0;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkViZW5lXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTIgMTIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDEyIDEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHN0eWxlIHR5cGU9InRleHQvY3NzIj4uc3Qwe2ZpbGw6Izg4ODg4ODt9PC9zdHlsZT48cGF0aCBpZD0iQm9yZGVyIiBjbGFzcz0ic3QwIiBkPSJNMTEsMTFIMFYwaDExVjExeiBNMTAsMUgxdjloOVYxeiIvPjxnIGlkPSJJbm5lciI+PHJlY3QgeD0iMiIgeT0iNSIgY2xhc3M9InN0MCIgd2lkdGg9IjciIGhlaWdodD0iMSIvPjxyZWN0IHg9IjUiIHk9IjIiIGNsYXNzPSJzdDAiIHdpZHRoPSIxIiBoZWlnaHQ9IjciLz48L2c+PC9zdmc+);display:inline-block}
558  .extbase-debugger-tree input:checked~.extbase-debug-content{display:inline}
559  .extbase-debugger-tree input:checked~.extbase-debug-header:before{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkViZW5lXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTIgMTIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDEyIDEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHN0eWxlIHR5cGU9InRleHQvY3NzIj4uc3Qwe2ZpbGw6Izg4ODg4ODt9PC9zdHlsZT48cGF0aCBpZD0iQm9yZGVyIiBjbGFzcz0ic3QwIiBkPSJNMTEsMTFIMFYwaDExVjExeiBNMTAsMUgxdjloOVYxeiIvPjxnIGlkPSJJbm5lciI+PHJlY3QgeD0iMiIgeT0iNSIgY2xhc3M9InN0MCIgd2lkdGg9IjciIGhlaWdodD0iMSIvPjwvZz48L3N2Zz4=)}
560  .extbase-debugger{display:block;text-align:left;background:#2a2a2a;border:1px solid #2a2a2a;box-shadow:0 3px 0 rgba(0,0,0,.5);color:#000;margin:20px;overflow:hidden;border-radius:4px}
561  .extbase-debugger-floating{position:relative;z-index:999}
562  .extbase-debugger-top{background:#444;font-size:12px;font-family:monospace;color:#f1f1f1;padding:6px 15px}
563  .extbase-debugger-center{padding:0 15px;margin:15px 0;background-image:repeating-linear-gradient(to bottom,transparent 0,transparent 20px,#252525 20px,#252525 40px)}
564  .extbase-debugger-center,.extbase-debugger-center .extbase-debug-string,.extbase-debugger-center a,.extbase-debugger-center p,.extbase-debugger-center pre,.extbase-debugger-center strong{font-size:12px;font-weight:400;font-family:monospace;line-height:20px;color:#f1f1f1}
565  .extbase-debugger-center pre{background-color:transparent;margin:0;padding:0;border:0;word-wrap:break-word;color:#999}
566  .extbase-debugger-center .extbase-debug-string{color:#ce9178;white-space:normal}
567  .extbase-debugger-center .extbase-debug-type{color:#569CD6;padding-right:4px}
568  .extbase-debugger-center .extbase-debug-unregistered{background-color:#dce1e8}
569  .extbase-debugger-center .extbase-debug-filtered,.extbase-debugger-center .extbase-debug-proxy,.extbase-debugger-center .extbase-debug-ptype,.extbase-debugger-center .extbase-debug-visibility,.extbase-debugger-center .extbase-debug-scope{color:#fff;font-size:10px;line-height:12px;padding:2px 4px;margin-right:2px;position:relative;top:-1px}
570  .extbase-debugger-center .extbase-debug-scope{background-color:#497AA2}
571  .extbase-debugger-center .extbase-debug-ptype{background-color:#698747}
572  .extbase-debugger-center .extbase-debug-visibility{background-color:#698747}
573  .extbase-debugger-center .extbase-debug-dirty{background-color:#FFFFB6}
574  .extbase-debugger-center .extbase-debug-filtered{background-color:#4F4F4F}
575  .extbase-debugger-center .extbase-debug-seeabove{text-decoration:none;font-style:italic}
576  .extbase-debugger-center .extbase-debug-property{color:#f1f1f1}
577  .extbase-debugger-center .extbase-debug-closure{color:#9BA223;}
578  </style>';
579  self::$stylesheetEchoed = true;
580  }
581  if ($plainText) {
582  $output = $title . PHP_EOL . self::renderDump($variable, 0, true, $ansiColors) . PHP_EOL . PHP_EOL;
583  } else {
584  $output = '
585  <div class="extbase-debugger ' . ($return ? 'extbase-debugger-inline' : 'extbase-debugger-floating') . '">
586  <div class="extbase-debugger-top">' . htmlspecialchars($title, ENT_COMPAT) . '</div>
587  <div class="extbase-debugger-center">
588  <pre dir="ltr">' . self::renderDump($variable, 0, false, false) . '</pre>
589  </div>
590  </div>
591  ';
592  }
593  self::$blacklistedClassNames = $backupBlacklistedClassNames;
594  self::$blacklistedPropertyNames = $backupBlacklistedPropertyNames;
595  if ($return === true) {
596  return $css . $output;
597  }
598  echo $css . $output;
599 
600  return '';
601  }
602 }
‪TYPO3\CMS\Extbase\Utility\DebuggerUtility\clearState
‪static clearState()
Definition: DebuggerUtility.php:84
‪TYPO3\CMS\Extbase\Utility\DebuggerUtility\PLAINTEXT_INDENT
‪const PLAINTEXT_INDENT
Definition: DebuggerUtility.php:42
‪TYPO3\CMS\Extbase\Utility\DebuggerUtility\renderDump
‪static string renderDump($value, int $level, bool $plainText, bool $ansiColors)
Definition: DebuggerUtility.php:98
‪TYPO3\CMS\Extbase\Utility\DebuggerUtility\$stylesheetEchoed
‪static bool $stylesheetEchoed
Definition: DebuggerUtility.php:73
‪TYPO3\CMS\Extbase\Persistence\ObjectStorage\_isDirty
‪bool _isDirty()
Definition: ObjectStorage.php:347
‪TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory
Definition: QueryObjectModelFactory.php:27
‪TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper
Definition: DataMapper.php:52
‪TYPO3\CMS\Extbase\DomainObject\AbstractEntity
Definition: AbstractEntity.php:23
‪TYPO3\CMS\Extbase\Utility\DebuggerUtility\$maxDepth
‪static int $maxDepth
Definition: DebuggerUtility.php:79
‪TYPO3\CMS\Extbase\Utility\DebuggerUtility\$renderedObjects
‪static TYPO3 CMS Extbase Persistence ObjectStorage $renderedObjects
Definition: DebuggerUtility.php:47
‪TYPO3\CMS\Extbase\Utility\DebuggerUtility\$blacklistedClassNames
‪static array $blacklistedClassNames
Definition: DebuggerUtility.php:53
‪TYPO3\CMS\Extbase\Persistence\ObjectStorage
Definition: ObjectStorage.php:28
‪TYPO3\CMS\Extbase\Reflection\ReflectionService
Definition: ReflectionService.php:31
‪TYPO3\CMS\Extbase\Utility\DebuggerUtility\renderContent
‪static string renderContent(object $object, int $level, bool $plainText, bool $ansiColors)
Definition: DebuggerUtility.php:347
‪TYPO3\CMS\Extbase\Utility\DebuggerUtility\ansiEscapeWrap
‪static string ansiEscapeWrap(string $string, string $ansiColors, bool $enable=true)
Definition: DebuggerUtility.php:497
‪TYPO3\CMS\Extbase\DomainObject\AbstractValueObject
Definition: AbstractValueObject.php:24
‪TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface
Definition: DomainObjectInterface.php:29
‪TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager
Definition: PersistenceManager.php:29
‪TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject
Definition: AbstractDomainObject.php:31
‪TYPO3\CMS\Extbase\Utility\DebuggerUtility\renderHeader
‪static string renderHeader(object $object, int $level, bool $plainText, bool $ansiColors)
Definition: DebuggerUtility.php:258
‪TYPO3\CMS\Extbase\Utility\DebuggerUtility\renderClosure
‪static string renderClosure(\Closure $object, int $level, bool $plainText=false, bool $ansiColors=false)
Definition: DebuggerUtility.php:208
‪TYPO3\CMS\Extbase\Utility\DebuggerUtility
Definition: DebuggerUtility.php:41
‪TYPO3\CMS\Extbase\Utility\DebuggerUtility\$blacklistedPropertyNames
‪static array $blacklistedPropertyNames
Definition: DebuggerUtility.php:67
‪debug
‪debug($variable='', $title=null, $group=null)
Definition: GlobalDebugFunctions.php:19
‪TYPO3\CMS\Extbase\Utility\DebuggerUtility\isBlacklisted
‪static bool isBlacklisted(object $value)
Definition: DebuggerUtility.php:228
‪TYPO3\CMS\Extbase\Utility\DebuggerUtility\HTML_INDENT
‪const HTML_INDENT
Definition: DebuggerUtility.php:43
‪TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy
Definition: LazyLoadingProxy.php:29
‪TYPO3\CMS\Core\SingletonInterface
Definition: SingletonInterface.php:23
‪TYPO3\CMS\Extbase\Utility\DebuggerUtility\renderArray
‪static string renderArray(array $array, int $level, bool $plainText=false, bool $ansiColors=false)
Definition: DebuggerUtility.php:139
‪TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer
Definition: ContentObjectRenderer.php:97
‪TYPO3\CMS\Extbase\Utility
Definition: DebuggerUtility.php:18
‪TYPO3\CMS\Extbase\Utility\DebuggerUtility\isAlreadyRendered
‪static bool isAlreadyRendered(object $object)
Definition: DebuggerUtility.php:244
‪TYPO3\CMS\Extbase\Object\ObjectManager
Definition: ObjectManager.php:28
‪TYPO3\CMS\Extbase\Utility\DebuggerUtility\renderObject
‪static string renderObject(object $object, int $level, bool $plainText=false, bool $ansiColors=false)
Definition: DebuggerUtility.php:179
‪TYPO3\CMS\Extbase\Utility\DebuggerUtility\renderCollection
‪static string renderCollection(iterable $collection, int $level, bool $plainText, bool $ansiColors)
Definition: DebuggerUtility.php:468