You are here

private function LoggerDataCollector::sanitizeContext in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php \Symfony\Component\HttpKernel\DataCollector\LoggerDataCollector::sanitizeContext()
1 call to LoggerDataCollector::sanitizeContext()
LoggerDataCollector::sanitizeLogs in vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php

File

vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php, line 142

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;
}