PHP Class League\CommonMark\Converter

Datei anzeigen Open project: colinodell/commonmark-php Class Usage Examples

Protected Properties

Property Type Description
$docParser DocParser The document parser instance.
$htmlRenderer League\CommonMark\ElementRendererInterface The html renderer instance.

Public Methods

Method Description
__construct ( DocParser $docParser, League\CommonMark\ElementRendererInterface $htmlRenderer ) Create a new commonmark converter instance.
__invoke ( $commonMark ) : string Converts CommonMark to HTML.
convertToHtml ( string $commonMark ) : string Converts CommonMark to HTML.

Method Details

__construct() public method

Create a new commonmark converter instance.
public __construct ( DocParser $docParser, League\CommonMark\ElementRendererInterface $htmlRenderer )
$docParser DocParser
$htmlRenderer League\CommonMark\ElementRendererInterface

__invoke() public method

Converts CommonMark to HTML.
See also: Converter::convertToHtml
public __invoke ( $commonMark ) : string
$commonMark
return string

convertToHtml() public method

Converts CommonMark to HTML.
public convertToHtml ( string $commonMark ) : string
$commonMark string
return string

Property Details

$docParser protected_oe property

The document parser instance.
protected DocParser,League\CommonMark $docParser
return DocParser

$htmlRenderer protected_oe property

The html renderer instance.
protected ElementRendererInterface,League\CommonMark $htmlRenderer
return League\CommonMark\ElementRendererInterface