Skip to content
PHP Ecosystem
Explore

ClearableContentInterface

API reference › HTML Contracts › Element › ClearableContentInterface

interfaceUIAwesome\Html\Contracts\Element\ClearableContentInterface
ExtendsContentInterface
Sourcesrc/Element/ClearableContentInterface.php
Implemented by 1 type

Defines an optional immutable API for clearing accumulated element content.

Extends ContentInterface without requiring existing content implementations to support clearing.

MethodDescriptionDefined by
clearContent() abstractClears encoded and raw content without changing other component state.ClearableContentInterface
content() abstractAppends encoded content.ContentInterface
getContent() abstractReturns the content assigned to the element.ContentInterface
html() abstractAppends trusted raw HTML content without encoding or sanitizing it.ContentInterface
abstract public function clearContent(): static

Clears encoded and raw content without changing other component state.

Returns

static: New instance with empty content.