/** * LeonardoCA\Tools\SmartDump shortcut. * - you can optionally set $maxDepth, $maxLen * - this parameters will be used just for single dump and than returned to previous values * * @param mixed|array $arg Any variable or array of variables * @param string $title * @param int|number $maxDepth * @param int|number $maxLen * @param bool|string $showLocation * @return void */ function sdump($arg = 'called without argument', $title = '', $maxDepth = 4, $maxLen = 200, $showLocation = true) { if (!Debugger::$productionMode) { $maxDepthBackup = Debugger::$maxDepth; $maxLenBackup = Debugger::$maxLen; $showLocationBackup = Debugger::$showLocation; Debugger::$maxDepth = $maxDepth; Debugger::$maxLen = $maxLen; Debugger::$showLocation = $showLocation; SmartDump::sdump($arg, $title); Debugger::$maxDepth = $maxDepthBackup; Debugger::$maxLen = $maxLenBackup; Debugger::$showLocation = $showLocationBackup; } }
public function send(Message $mail) { SmartDump::sdump($mail->headers, 'Email'); SmartDump::addToDumpPanel(shadowDomTemplate('Email', dumpHtml((string) $mail->htmlBody, true, 0, true), prettyPrintStyle())); }