Extract ContentType from format
This commit is contained in:
parent
386f323dd0
commit
e543a107b1
@ -1,4 +1,4 @@
|
||||
<?php namespace Todaymade\Daux\Format\Base\ContentTypes;
|
||||
<?php namespace Todaymade\Daux\ContentTypes;
|
||||
|
||||
use Todaymade\Daux\Config;
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php namespace Todaymade\Daux\Format\Base\ContentTypes;
|
||||
<?php namespace Todaymade\Daux\ContentTypes;
|
||||
|
||||
use Todaymade\Daux\Tree\Content;
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php namespace Todaymade\Daux\Format\Base\ContentTypes\Markdown;
|
||||
<?php namespace Todaymade\Daux\ContentTypes\Markdown;
|
||||
|
||||
use League\CommonMark\DocParser;
|
||||
use League\CommonMark\Environment;
|
@ -1,8 +1,8 @@
|
||||
<?php namespace Todaymade\Daux\Format\Base\ContentTypes\Markdown;
|
||||
<?php namespace Todaymade\Daux\ContentTypes\Markdown;
|
||||
|
||||
use Todaymade\Daux\Config;
|
||||
|
||||
class ContentType implements \Todaymade\Daux\Format\Base\ContentTypes\ContentType
|
||||
class ContentType implements \Todaymade\Daux\ContentTypes\ContentType
|
||||
{
|
||||
/** @var Config */
|
||||
protected $config;
|
@ -1,4 +1,4 @@
|
||||
<?php namespace Todaymade\Daux\Format\Base\ContentTypes\Markdown;
|
||||
<?php namespace Todaymade\Daux\ContentTypes\Markdown;
|
||||
|
||||
use League\CommonMark\HtmlElement;
|
||||
use League\CommonMark\HtmlRendererInterface;
|
@ -1,7 +1,7 @@
|
||||
<?php namespace Todaymade\Daux;
|
||||
|
||||
use Symfony\Component\Console\Output\NullOutput;
|
||||
use Todaymade\Daux\Format\Base\ContentTypes\ContentTypeHandler;
|
||||
use Todaymade\Daux\ContentTypes\ContentTypeHandler;
|
||||
use Todaymade\Daux\Tree\Builder;
|
||||
use Todaymade\Daux\Tree\Root;
|
||||
|
||||
@ -19,7 +19,7 @@ class Daux
|
||||
/** @var \Todaymade\Daux\Format\Base\Generator */
|
||||
protected $generator;
|
||||
|
||||
/** @var \Todaymade\Daux\Format\Base\ContentTypes\ContentTypeHandler */
|
||||
/** @var ContentTypeHandler */
|
||||
protected $typeHandler;
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php namespace Todaymade\Daux\Format\Base;
|
||||
|
||||
use Todaymade\Daux\Config;
|
||||
use Todaymade\Daux\Format\Base\ContentTypes\ContentType;
|
||||
use Todaymade\Daux\ContentTypes\ContentType;
|
||||
use Todaymade\Daux\Tree\Content;
|
||||
|
||||
abstract class ContentPage extends SimplePage
|
||||
|
@ -3,7 +3,6 @@
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Todaymade\Daux\Daux;
|
||||
use Todaymade\Daux\Format\Base\ContentTypes\ContentTypeHandler;
|
||||
|
||||
interface Generator
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
use League\CommonMark\Environment;
|
||||
|
||||
class CommonMarkConverter extends \Todaymade\Daux\Format\Base\ContentTypes\Markdown\CommonMarkConverter
|
||||
class CommonMarkConverter extends \Todaymade\Daux\ContentTypes\Markdown\CommonMarkConverter
|
||||
{
|
||||
protected function getLinkRenderer(Environment $environment)
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
use Todaymade\Daux\Config;
|
||||
|
||||
class ContentType extends \Todaymade\Daux\Format\Base\ContentTypes\Markdown\ContentType
|
||||
class ContentType extends \Todaymade\Daux\ContentTypes\Markdown\ContentType
|
||||
{
|
||||
public function __construct(Config $config)
|
||||
{
|
||||
|
@ -5,7 +5,7 @@ use League\CommonMark\HtmlRendererInterface;
|
||||
use League\CommonMark\Inline\Element\AbstractInline;
|
||||
use League\CommonMark\Inline\Element\Link;
|
||||
|
||||
class LinkRenderer extends \Todaymade\Daux\Format\Base\ContentTypes\Markdown\LinkRenderer
|
||||
class LinkRenderer extends \Todaymade\Daux\ContentTypes\Markdown\LinkRenderer
|
||||
{
|
||||
/**
|
||||
* @param Link $inline
|
||||
|
@ -5,8 +5,6 @@ use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Todaymade\Daux\Config;
|
||||
use Todaymade\Daux\Console\RunAction;
|
||||
use Todaymade\Daux\Daux;
|
||||
use Todaymade\Daux\Format\Base\ContentTypes\ContentTypeHandler;
|
||||
use Todaymade\Daux\Format\Confluence\CommonMark\CommonMarkConverter;
|
||||
use Todaymade\Daux\Tree\Content;
|
||||
use Todaymade\Daux\Tree\Directory;
|
||||
|
||||
|
@ -4,10 +4,9 @@ use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Todaymade\Daux\Config;
|
||||
use Todaymade\Daux\Console\RunAction;
|
||||
use Todaymade\Daux\ContentTypes\Markdown\ContentType;
|
||||
use Todaymade\Daux\Daux;
|
||||
use Todaymade\Daux\DauxHelper;
|
||||
use Todaymade\Daux\Format\Base\CommonMark\CommonMarkConverter;
|
||||
use Todaymade\Daux\Format\Base\ContentTypes\ContentTypeHandler;
|
||||
use Todaymade\Daux\Format\Base\LiveGenerator;
|
||||
use Todaymade\Daux\GeneratorHelper;
|
||||
use Todaymade\Daux\Tree\Content;
|
||||
@ -36,7 +35,7 @@ class Generator implements \Todaymade\Daux\Format\Base\Generator, LiveGenerator
|
||||
public function getContentTypes()
|
||||
{
|
||||
return [
|
||||
new \Todaymade\Daux\Format\Base\ContentTypes\Markdown\ContentType($this->daux->getParams())
|
||||
'markdown' => new ContentType($this->daux->getParams())
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user