XSLTProcessor::importStylesheet

(PHP 5, PHP 7, PHP 8)

XSLTProcessor::importStylesheetImport stylesheet

Опис

public XSLTProcessor::importStylesheet(object $stylesheet): bool

This method imports the stylesheet into the XSLTProcessor for transformations.

Параметри

stylesheet

The imported style sheet as a Dom\Document, DOMDocument or SimpleXMLElement object.

Значення, що повертаються

Повертає true у разі успіху або false в разі помилки.

Помилки/виключення

Throws a TypeError if stylesheet is not an XML object.

Журнал змін

Версія Опис
8.4.0 Added support for Dom\Document.
8.4.0 Now throws a TypeError instead of a ValueError if stylesheet is not an XML object.