Appearance
Html
php
final class KMark\HtmlSmall helpers to write HTML.
Source: src/Html.php
Methods
attribute()
php
public static function attribute(string $value): stringThe value of an attribute.
escape()
php
public static function escape(string $text): stringThe text with its special characters written as entities, except the entities that are already there.
escapeCode()
php
public static function escapeCode(string $text): stringThe text of a code span or of a code block: every special character is written as an entity.
withAttributes()
php
public static function withAttributes(string $html, Attributes $attributes): stringAdds attributes to the first tag of an HTML block, with the ones it already has: the id of the first wins, the classes are added to each other.