ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
UserDefined.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Data\Meta\Html;
22 
23 use Generator;
24 
28 class UserDefined extends Tag
29 {
30  public function __construct(
31  protected string $key,
32  protected string $value
33  ) {
34  }
35 
39  public function toHtml(): string
40  {
41  return "<meta name=\"" . htmlspecialchars($this->key) . "\" content=\"" . htmlspecialchars($this->value) . "\" />";
42  }
43 
44  public function getKey(): string
45  {
46  return $this->key;
47  }
48 
49  public function getValue(): string
50  {
51  return $this->value;
52  }
53 }
__construct(protected string $key, protected string $value)
Definition: UserDefined.php:30