PHP Class League\CommonMark\Converter

Afficher le fichier Open project: colinodell/commonmark-php Class Usage Examples

Protected Properties

Свойство Type Description
$docParser DocParser The document parser instance.
$htmlRenderer League\CommonMark\ElementRendererInterface The html renderer instance.

Méthodes publiques

Méthode 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 méthode

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

__invoke() public méthode

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

convertToHtml() public méthode

Converts CommonMark to HTML.
public convertToHtml ( string $commonMark ) : string
$commonMark string
Résultat string

Property Details

$docParser protected_oe property

The document parser instance.
protected DocParser,League\CommonMark $docParser
Résultat DocParser

$htmlRenderer protected_oe property

The html renderer instance.
protected ElementRendererInterface,League\CommonMark $htmlRenderer
Résultat League\CommonMark\ElementRendererInterface