PHP Class eZ\Publish\Core\FieldType\RichText\XmlBase

Datei anzeigen Open project: ezsystems/ezpublish-kernel

Protected Properties

Property Type Description
$errorTypes array Textual mapping for libxml error type constants.
$useInternalErrors null | boolean When recording errors holds previous setting for libxml user error handling, null otherwise.

Protected Methods

Method Description
collectErrors ( ) : string[] Returns formatted errors from libxml error buffer and restores previous setting for libxml error handling.
formatLibXmlError ( LibXMLError $error ) : string Formats libxml error object as a string.
loadFile ( string $path ) : DOMDocument Returns DOMDocument object loaded from given XML file $path.
startRecordingErrors ( ) Enables user handling of libxml errors and clears error buffer.

Method Details

collectErrors() protected method

Before calling this method error recording must be started by calling {@link startRecordingErrors()}.
See also: startRecordingErrors()
protected collectErrors ( ) : string[]
return string[]

formatLibXmlError() protected method

Example: Error in 6:0: Expecting an element title, got nothing
protected formatLibXmlError ( LibXMLError $error ) : string
$error LibXMLError
return string

loadFile() protected method

Returns DOMDocument object loaded from given XML file $path.
protected loadFile ( string $path ) : DOMDocument
$path string
return DOMDocument

startRecordingErrors() protected method

Previous setting for libxml error handling is remembered. This method is intended to be used together with {@link collectErrors()}.
protected startRecordingErrors ( )

Property Details

$errorTypes protected_oe property

Textual mapping for libxml error type constants.
protected array $errorTypes
return array

$useInternalErrors protected_oe property

When recording errors holds previous setting for libxml user error handling, null otherwise.
protected null|bool $useInternalErrors
return null | boolean