Trait yii\apidoc\helpers\MarkdownHighlightTrait

Implemented byyii\apidoc\helpers\ApiMarkdown
Available since version2.1.1
Source Code https://github.com/yiisoft/yii2-apidoc/blob/master/helpers/MarkdownHighlightTrait.php

MarkdownHighlightTrait provides code highlighting functionality for Markdown Parsers.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
highlight() Highlights code yii\apidoc\helpers\MarkdownHighlightTrait

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
renderCode() yii\apidoc\helpers\MarkdownHighlightTrait

Method Details

highlight() public static method
Deprecated since 2.0.5 this method is not used anymore, highlight.php is used for highlighting

Highlights code

public static string highlight ( $code, $language )
$code string

Code to highlight

$language string

Language of the code to highlight

return string

HTML of highlighted code

renderCode() protected method

protected void renderCode ( $block )
$block