path = $path; } /** * @return string */ function __toString() { try { $r = fopen($this->path->getFullPath(".md"), "r"); $md = \MarkdownDocument::createFromStream($r); $md->compile(\MarkdownDocument::AUTOLINK | \MarkdownDocument::TOC); $html = $md->getHtml(); fclose($r); } catch (\Exception $e) { $html = ExceptionHandler::html($e); } return $html; } }