2024 年 PHP 日本研討會

XSLTProcessor 類別

(PHP 5, PHP 7, PHP 8)

簡介

類別概要

class XSLTProcessor {
/* 屬性 */
public bool $doXInclude = false;
公開 布林值 $cloneDocument = false;
/* 方法 */
公開 取得參數(字串 $namespace, 字串 $name): 字串|false
公開 匯入樣式表(物件 $stylesheet): 布林值
公開 註冊PHP函式(陣列|字串|null $functions = null):
公開 移除參數(字串 $namespace, 字串 $name): 布林值
公開 設定參數(字串 $namespace, 字串 $name, 字串 $value): 布林值
公開 設定參數(字串 $namespace, 陣列 $options): 布林值
公開 setProfiling(?字串 $filename):
公開 setSecurityPrefs(整數 $preferences): 整數
公開 transformToDoc(物件 $document, ?字串 $returnClass = null): 物件|
公開 transformToUri(物件 $document, 字串 $uri): 整數
公開 transformToXml(物件 $document): 字串|null|
}

屬性

doXInclude
是否執行 xIncludes。
cloneDocument
是否在文件的副本上執行轉換。
maxTemplateDepth
範本遞迴的最大深度。
maxTemplateVars
範本中變數的最大數量。

更新日誌

版本 說明
8.4.0 屬性 doXIncludecloneDocument 現在已在類別上明確定義。
8.4.0 新增屬性 maxTemplateDepthmaxTemplateVars

目錄

新增筆記

使用者貢獻的筆記 3 則筆記

tschallacka
8 年前
在 Windows 系統中,取消 php.ini 中 extension=php_xsl.dll 的註釋以啟用它。然後重新啟動您的網頁伺服器以重新整理 PHP。
joandres52725lm at gmail dot com
4 年前
【更新】PHP 版本 /.3.15 和 Windows 取消註釋 `extension=xsl` 以在您的 php.ini 中啟用它。然後重新啟動您的網頁伺服器以重新整理 PHP。
flavius
9 年前
它需要 PHP5 XSL 擴充套件。在 Linux 上:

sudo apt-get install php5-xsl
To Top