Class

eZ\Publish\Core\FieldType\RichText\Normalizer\DocumentTypeDefinition

class DocumentTypeDefinition extends Normalizer

Character entity definition normalizer adds DTD containing character entity definition to string input that conforms to an XML document with configured document element and default namespace.

Note: if input already contains DTD it won't be accepted for normalization.

Methods

bool accept(string $input)

Accept if $input looks like XML document, with configured document element and default namespace, but without DTD.

string normalize(string $input)

Normalizes given $input by adding DTD with character entity definition.

__construct($documentElement, $namespace, $dtdPath)

Details

at line 65
public bool accept(string $input)

Accept if $input looks like XML document, with configured document element and default namespace, but without DTD.

Parameters

string $input

Return Value

bool

at line 81
public string normalize(string $input)

Normalizes given $input by adding DTD with character entity definition.

Parameters

string $input

Return Value

string

at line 50
public __construct($documentElement, $namespace, $dtdPath)

Parameters

$documentElement
$namespace
$dtdPath