15 lines
293 B
PHP
15 lines
293 B
PHP
<?php
|
|
namespace YTKNS;
|
|
|
|
class HtmlText implements HtmlTypeInterface {
|
|
private string $text = '';
|
|
|
|
public function __construct(string $text) {
|
|
$this->text = $text;
|
|
}
|
|
|
|
public function asHTML(): string {
|
|
return htmlspecialchars($this->text);
|
|
}
|
|
}
|