Permalink
Browse files

Extract a new interface for the main Converter class

  • Loading branch information...
colinodell committed Sep 18, 2018
1 parent 1730732 commit 5f0e36beef091b17d19f8e5f11fe8a86a456e87b
Showing with 30 additions and 1 deletion.
  1. +1 −1 src/Converter.php
  2. +29 −0 src/ConverterInterface.php
@@ -17,7 +17,7 @@
/**
* Converts CommonMark-compatible Markdown to HTML.
*/
class Converter
class Converter implements ConverterInterface
{
/**
* The document parser instance.
@@ -0,0 +1,29 @@
<?php
/*
* This file is part of the league/commonmark package.
*
* (c) Colin O'Dell <colinodell@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace League\CommonMark;
/**
* Interface for a service which converts CommonMark to HTML.
*/
interface ConverterInterface
{
/**
* Converts CommonMark to HTML.
*
* @param string $commonMark
*
* @return string HTML
*
* @api
*/
public function convertToHtml($commonMark);
}

0 comments on commit 5f0e36b

Please sign in to comment.