1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

Add setting constructors for each property

This commit is contained in:
Aidan Woods 2018-11-11 18:30:39 +00:00
parent 822cf15ac9
commit f85f6cbd40
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9

View File

@ -73,6 +73,27 @@ final class Element implements Renderable
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
{
$html = '';