mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Html/Component -> Html/Renderable
This commit is contained in:
parent
7690b98f61
commit
9046f066df
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Erusev\Parsedown\Html;
|
namespace Erusev\Parsedown\Html;
|
||||||
|
|
||||||
interface Component
|
interface Renderable
|
||||||
{
|
{
|
||||||
public function getHtml(): string;
|
public function getHtml(): string;
|
||||||
}
|
}
|
@ -1,12 +1,12 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
namespace Erusev\Parsedown\Html\Components;
|
namespace Erusev\Parsedown\Html\Renderables;
|
||||||
|
|
||||||
use Erusev\Parsedown\Html\Component;
|
use Erusev\Parsedown\Html\Renderable;
|
||||||
use Erusev\Parsedown\Html\Sanitisation\CharacterFilter;
|
use Erusev\Parsedown\Html\Sanitisation\CharacterFilter;
|
||||||
use Erusev\Parsedown\Html\Sanitisation\Escaper;
|
use Erusev\Parsedown\Html\Sanitisation\Escaper;
|
||||||
|
|
||||||
final class Element implements Component
|
final class Element implements Renderable
|
||||||
{
|
{
|
||||||
/** @var string */
|
/** @var string */
|
||||||
private $name;
|
private $name;
|
||||||
@ -14,13 +14,13 @@ final class Element implements Component
|
|||||||
/** @var array<string, string>*/
|
/** @var array<string, string>*/
|
||||||
private $attributes;
|
private $attributes;
|
||||||
|
|
||||||
/** @var Component[]|null */
|
/** @var Renderable[]|null */
|
||||||
private $Contents;
|
private $Contents;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @param array<string, string> $attributes
|
* @param array<string, string> $attributes
|
||||||
* @param Component[]|null $Contents
|
* @param Renderable[]|null $Contents
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
string $name,
|
string $name,
|
||||||
@ -55,7 +55,7 @@ final class Element implements Component
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Component[]|null
|
* @return Renderable[]|null
|
||||||
*/
|
*/
|
||||||
public function contents(): ?array
|
public function contents(): ?array
|
||||||
{
|
{
|
@ -1,12 +1,12 @@
|
|||||||
<?php declare(strict_types=1);
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
namespace Erusev\Parsedown\Html\Components;
|
namespace Erusev\Parsedown\Html\Renderables;
|
||||||
|
|
||||||
use Erusev\Parsedown\Html\Component;
|
use Erusev\Parsedown\Html\Renderable;
|
||||||
use Erusev\Parsedown\Html\Sanitisation\CharacterFilter;
|
use Erusev\Parsedown\Html\Sanitisation\CharacterFilter;
|
||||||
use Erusev\Parsedown\Html\Sanitisation\Escaper;
|
use Erusev\Parsedown\Html\Sanitisation\Escaper;
|
||||||
|
|
||||||
final class Text implements Component
|
final class Text implements Renderable
|
||||||
{
|
{
|
||||||
/** @var string */
|
/** @var string */
|
||||||
private $text;
|
private $text;
|
Loading…
Reference in New Issue
Block a user