eZ\Publish\Core\FieldType\RichText\Value::__construct PHP Method

__construct() public method

Initializes a new RichText Value object with $xmlDoc in.
public __construct ( DOMDocument | string $xml = null )
$xml DOMDocument | string
    public function __construct($xml = null)
    {
        if ($xml instanceof DOMDocument) {
            $this->xml = $xml;
        } else {
            $this->xml = new DOMDocument();
            $this->xml->loadXML($xml === null ? self::EMPTY_VALUE : $xml);
        }
    }