Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.
<?php
/**
 * Markdown  -  A text-to-HTML conversion tool for web writers
 *
 * @package   php-markdown
 * @author    Michel Fortin <michel.fortin@michelf.com>
< * @copyright 2004-2018 Michel Fortin <https://michelf.com/projects/php-markdown/>
> * @copyright 2004-2022 Michel Fortin <https://michelf.com/projects/php-markdown/>
* @copyright (Original Markdown) 2004-2006 John Gruber <https://daringfireball.net/projects/markdown/> */ namespace Michelf; /** * Markdown Parser Interface */ interface MarkdownInterface { /** * Initialize the parser and return the result of its transform method. * This will work fine for derived classes too. * * @api * * @param string $text * @return string */
< public static function defaultTransform($text);
> public static function defaultTransform(string $text): string;
/** * Main function. Performs some preprocessing on the input text * and pass it through the document gamut. * * @api * * @param string $text * @return string */
< public function transform($text);
> public function transform(string $text): string;
}