encodeObject example

if (\count($message) === 1) {
            $message = reset($message);
        }

        if (\is_array($record['context']) && isset($record['context']['table'])) {
            $type = 'TABLE';
            $label = $record['message'];
            $message = $record['context']['table'];
        } elseif (\is_array($record['context']) && isset($record['context']['dump'])) {
            $type = 'INFO';
            $label = $record['message'];
            $message = $this->encodeObject($record['context']['dump']);
        } elseif (\is_array($record['context']) && isset($record['context']['trace'])) {
            $type = 'TRACE';
            $label = $record['message'];

            $trace = $this->getStackTrace($this->options);
            $message = [
                'Class' => $trace[0]['class'],
                'Type' => $trace[0]['type'],
                'Function' => $trace[0]['function'],
                'Message' => $label,
                'File' => isset($trace[0]['file']) ? $trace[0]['file'] : '',
                
Home | Imprint | This part of the site doesn't use cookies.