Automattic\WooCommerce\Vendor\Pelago\Emogrifier\HtmlProcessor

AbstractHtmlProcessor::getHtmlElementprotectedWC 1.0

Returns the HTML element.

This method assumes that there always is an HTML element, throwing an exception otherwise.

Метод класса: AbstractHtmlProcessor{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->getHtmlElement(): \DOMElement;

Код AbstractHtmlProcessor::getHtmlElement() WC 10.4.3

protected function getHtmlElement(): \DOMElement
{
    $htmlElement = $this->getDomDocument()->getElementsByTagName('html')->item(0);
    if (!$htmlElement instanceof \DOMElement) {
        throw new \UnexpectedValueException('There is no HTML element although there should be one.', 1569930853);
    }

    return $htmlElement;
}