src/Debug/Output/Script.php
public function onOutput(Event $event)
    {
        $this->channelName = $this->debug->getCfg('channel');
        $this->data = $this->debug->getData();
        $errorStats = $this->debug->internal->errorStats();
        $errorStr = '';
        if ($errorStats['inConsole']) {
            $errorStr = 'Errors: ';
            foreach ($errorStats['counts'] as $category => $vals) {
                $errorStr .= $vals['inConsole'].' '.$category.', ';
            }
            $errorStr = \substr($errorStr, 0, -2);
        }
        $str = '';
        $str .= '<script type="text/javascript">'."\n";
        $str .= $this->processLogEntryWEvent('groupCollapsed', array(
            'PHP',
            (isset($_SERVER['REQUEST_METHOD']) && isset($_SERVER['REQUEST_URI'])
                ? $_SERVER['REQUEST_METHOD'].' '.$_SERVER['REQUEST_URI']
                : ''),
            $errorStr,
        ));
        $str .= $this->processAlerts();
        $str .= $this->processSummary();
        $str .= $this->processLog();
        $str .= $this->processLogEntryWEvent('groupEnd');
        $str .= '</script>'."\n";
        $this->data = array();
        $event['return'] .= $str;
    }
public function onOutput(Event $event)
    {
        $this->channelName = $this->debug->getCfg('channel');
        $this->data = $this->debug->getData();
        $errorStats = $this->debug->internal->errorStats();
        $errorStr = '';
        if ($errorStats['inConsole']) {
            $errorStr = 'Errors: ';
            foreach ($errorStats['counts'] as $category => $vals) {
                $errorStr .= $vals['inConsole'].' '.$category.', ';
            }
            $errorStr = \substr($errorStr, 0, -2);
        }
        $str = '';
        $str .= '<script type="text/javascript">'."\n";
        $str .= $this->processLogEntryWEvent('groupCollapsed', array(
            'PHP',
            (isset($_SERVER['REQUEST_METHOD']) && isset($_SERVER['REQUEST_URI'])
                ? $_SERVER['REQUEST_METHOD'].' '.$_SERVER['REQUEST_URI']
                : ''),
            $errorStr,
        ));
        $str .= $this->processAlerts();
        $str .= $this->processSummary();
        $str .= $this->processLog();
        $str .= $this->processLogEntryWEvent('groupEnd');
        $str .= '</script>'."\n";
        $this->data = array();
        $event['return'] .= $str;
    }
public function onOutput ( Event $ event ) { $ this -> channelName = $ this -> debug -> getCfg ( 'channel' ) ; $ this -> data = $ this -> debug -> getData ( ) ; $ errorStats = $ this -> debug -> internal -> errorStats ( ) ; $ errorStr = '' ; if ( $ errorStats [ 'inConsole' ] ) { $ errorStr = 'Errors: ' ; foreach ( $ errorStats [ 'counts' ] as $ category => $ vals ) { $ errorStr .= $ vals [ 'inConsole' ] . ' ' . $ category . ', ' ; } $ errorStr = \ substr ( $ errorStr , 0 , - 2 ) ; } $ str = '' ; $ str .= '<script type="text/javascript">' . "\n" ; $ str .= $ this -> processLogEntryWEvent ( 'groupCollapsed' , array ( 'PHP' , ( isset ( $ _SERVER [ 'REQUEST_METHOD' ] ) && isset ( $ _SERVER [ 'REQUEST_URI' ] ) ? $ _SERVER [ 'REQUEST_METHOD' ] . ' ' . $ _SERVER [ 'REQUEST_URI' ] : '' ) , $ errorStr , ) ) ; $ str .= $ this -> processAlerts ( ) ; $ str .= $ this -> processSummary ( ) ; $ str .= $ this -> processLog ( ) ; $ str .= $ this -> processLogEntryWEvent ( 'groupEnd' ) ; $ str .= '</script>' . "\n" ; $ this -> data = array ( ) ; $ event [ 'return' ] .= $ str ; }
output the log as javascript
which outputs the log to the console

@param Event $event event object

@return string|void
output the log as javascript which outputs the log to the console