mirror of
https://github.com/erusev/parsedown.git
synced 2024-09-20 12:01:29 +02:00
Add setting constructors for each property
This commit is contained in:
parent
822cf15ac9
commit
f85f6cbd40
@ -73,6 +73,27 @@ final class Element implements Renderable
|
|||||||
return $this->Contents;
|
return $this->Contents;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function settingName(string $name): self
|
||||||
|
{
|
||||||
|
return new self($name, $this->attributes, $this->Contents);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array<string, string> $attributes
|
||||||
|
*/
|
||||||
|
public function settingAttributes(array $attributes): self
|
||||||
|
{
|
||||||
|
return new self($this->name, $attributes, $this->Contents);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Renderable[]|null $Contents
|
||||||
|
*/
|
||||||
|
public function settingContents(?array $Contents): self
|
||||||
|
{
|
||||||
|
return new self($this->name, $this->attributes, $Contents);
|
||||||
|
}
|
||||||
|
|
||||||
public function getHtml(): string
|
public function getHtml(): string
|
||||||
{
|
{
|
||||||
$html = '';
|
$html = '';
|
||||||
|
Loading…
Reference in New Issue
Block a user