public function toHtml($json)
    {
        // convert the json to an associative array
        $input = json_decode($json, true);
        $html = '';

        // loop trough the data blocks
        foreach ($input['data'] as $block) {
            $html .= $this->convert(new SirTrevorBlock($block['type'], $block['data']));
        }

        return $html;
    }
public function toHtml($json)
    {
        // convert the json to an associative array
        $input = json_decode($json, true);
        $html = '';

        // loop trough the data blocks
        foreach ($input['data'] as $block) {
            $html .= $this->convert(new SirTrevorBlock($block['type'], $block['data']));
        }

        return $html;
    }
public function toHtml ( $ json ) { // convert the json to an associative array $ input = json_decode ( $ json , true ) ; $ html = '' ; // loop trough the data blocks foreach ( $ input [ 'data' ] as $ block ) { $ html .= $ this -> convert ( new SirTrevorBlock ( $ block [ 'type' ] , $ block [ 'data' ] ) ) ; } return $ html ; }
Converts the outputted json from Sir Trevor to html

@param  string $json
@return string
Converts the outputted json from Sir Trevor to html