private function LoggerDataCollector::sanitizeContext

1 call to LoggerDataCollector::sanitizeContext()
LoggerDataCollector::sanitizeLogs in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php, line 86

Class

LoggerDataCollector
LogDataCollector.

Namespace

Symfony\Component\HttpKernel\DataCollector

Code

private function sanitizeContext($context) {
  if (is_array($context)) {
    foreach ($context as $key => $value) {
      $context[$key] = $this
        ->sanitizeContext($value);
    }
    return $context;
  }
  if (is_resource($context)) {
    return sprintf('Resource(%s)', get_resource_type($context));
  }
  if (is_object($context)) {
    return sprintf('Object(%s)', get_class($context));
  }
  return $context;
}