Gregwar\RST\Parser::parse PHP Method

parse() public method

Parse a document and return a Document instance
public parse ( string $document ) : Gregwar\RST\Document
$document string The contents (string) of the document
return Gregwar\RST\Document The created document
    public function parse($document)
    {
        $this->getEnvironment()->reset();
        return $this->parseLocal($document);
    }

Usage Example

コード例 #1
0
<?php

include '../../autoload.php';
use Gregwar\RST\Parser;
$parser = new Parser();
$document = $parser->parse(file_get_contents('document.rst'));
echo $document->renderDocument();
All Usage Examples Of Gregwar\RST\Parser::parse