2015-07-29 22:31:41 +02:00
|
|
|
<?php namespace Todaymade\Daux\ContentTypes;
|
2015-07-28 17:25:03 +02:00
|
|
|
|
|
|
|
use Todaymade\Daux\Config;
|
2015-07-31 12:53:22 +02:00
|
|
|
use Todaymade\Daux\Tree\Content;
|
2015-07-28 17:25:03 +02:00
|
|
|
|
|
|
|
interface ContentType
|
|
|
|
{
|
|
|
|
public function __construct(Config $config);
|
|
|
|
|
|
|
|
/**
|
2020-04-22 22:24:52 +02:00
|
|
|
* Get the file extensions supported by this Content Type.
|
2015-07-28 17:25:03 +02:00
|
|
|
*
|
|
|
|
* @return string[]
|
|
|
|
*/
|
|
|
|
public function getExtensions();
|
|
|
|
|
2015-07-31 12:53:22 +02:00
|
|
|
/**
|
|
|
|
* @param string $raw The raw text to render
|
|
|
|
* @param Content $node The original node we are converting
|
2020-04-22 22:24:52 +02:00
|
|
|
*
|
2015-07-31 12:53:22 +02:00
|
|
|
* @return string The generated output
|
|
|
|
*/
|
|
|
|
public function convert($raw, Content $node);
|
2015-07-28 17:25:03 +02:00
|
|
|
}
|