MarkdownInterface.php 898 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * Markdown - A text-to-HTML conversion tool for web writers
  4. *
  5. * @package php-markdown
  6. * @author Michel Fortin <michel.fortin@michelf.com>
  7. * @copyright 2004-2018 Michel Fortin <https://michelf.com/projects/php-markdown/>
  8. * @copyright (Original Markdown) 2004-2006 John Gruber <https://daringfireball.net/projects/markdown/>
  9. */
  10. namespace Michelf;
  11. /**
  12. * Markdown Parser Interface
  13. */
  14. interface MarkdownInterface {
  15. /**
  16. * Initialize the parser and return the result of its transform method.
  17. * This will work fine for derived classes too.
  18. *
  19. * @api
  20. *
  21. * @param string $text
  22. * @return string
  23. */
  24. public static function defaultTransform($text);
  25. /**
  26. * Main function. Performs some preprocessing on the input text
  27. * and pass it through the document gamut.
  28. *
  29. * @api
  30. *
  31. * @param string $text
  32. * @return string
  33. */
  34. public function transform($text);
  35. }