XSLTProcessor::importStylesheet

(PHP 5, PHP 7, PHP 8)

XSLTProcessor::importStylesheetImport stylesheet

Descrizione

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

This method imports the stylesheet into the XSLTProcessor for transformations.

Elenco dei parametri

stylesheet

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

Valori restituiti

Restituisce true in caso di successo, false in caso di fallimento.

Errori/Eccezioni

Throws a TypeError if stylesheet is not an XML object.

Log delle modifiche

Versione Descrizione
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.