ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
UserDefined.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\Data\Meta\Html;
22
23use Generator;
24
28class 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