1
0
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:
Aidan Woods 2018-11-04 13:27:23 +00:00
parent 7690b98f61
commit 9046f066df
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9
3 changed files with 10 additions and 10 deletions

View File

@ -2,7 +2,7 @@
namespace Erusev\Parsedown\Html; namespace Erusev\Parsedown\Html;
interface Component interface Renderable
{ {
public function getHtml(): string; public function getHtml(): string;
} }

View File

@ -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
{ {

View File

@ -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;