src/Console.php
public function outputHTML($message, $context = [])
    {
        $message = preg_replace_callback('/{([a-z0-9_-]+)}/i', function ($match) use ($context) {
            if (isset($context[$match[1]]) && is_string($context[$match[1]])) {
                return $context[$match[1]];
            }

            // don't change the original message
            return '{'.$match[1].'}';
        }, $message);

        $this->_output_bypass = true;
        $this->sse->send($this->js()->append($message.'<br/>'));
        $this->_output_bypass = false;

        return $this;
    }
public function outputHTML($message, $context = [])
    {
        $message = preg_replace_callback('/{([a-z0-9_-]+)}/i', function ($match) use ($context) {
            if (isset($context[$match[1]]) && is_string($context[$match[1]])) {
                return $context[$match[1]];
            }

            // don't change the original message
            return '{'.$match[1].'}';
        }, $message);

        $this->_output_bypass = true;
        $this->sse->send($this->js()->append($message.'<br/>'));
        $this->_output_bypass = false;

        return $this;
    }
public function outputHTML ( $ message , $ context = [ ] ) { $ message = preg_replace_callback ( '/{([a-z0-9_-]+)}/i' , function ( $ match ) use ( $ context ) { if ( isset ( $ context [ $ match [ 1 ] ] ) && is_string ( $ context [ $ match [ 1 ] ] ) ) { return $ context [ $ match [ 1 ] ] ; } // don't change the original message return '{' . $ match [ 1 ] . '}' ; } , $ message ) ; $ this -> _output_bypass = true ; $ this -> sse -> send ( $ this -> js ( ) -> append ( $ message . '<br/>' ) ) ; $ this -> _output_bypass = false ; return $ this ; }
Output un-escaped HTML line. Use this to send HTML.

@todo Use $message as template and fill values from $context in there.

@param string $message
@param array  $context

@return $this
Output un - escaped HTML line . Use this to send HTML .