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