本文整理匯總了PHP中eZPackage::fetchDOMFromFile方法的典型用法代碼示例。如果您正苦於以下問題:PHP eZPackage::fetchDOMFromFile方法的具體用法?PHP eZPackage::fetchDOMFromFile怎麽用?PHP eZPackage::fetchDOMFromFile使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類eZPackage
的用法示例。
在下文中一共展示了eZPackage::fetchDOMFromFile方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: uninstallItem
function uninstallItem($item, &$uninstallParameters)
{
$type = $item['type'];
$name = $item['name'];
$os = $item['os'];
$filename = $item['filename'];
$subdirectory = $item['sub-directory'];
$content = false;
if (isset($item['content'])) {
$content = $item['content'];
}
$handler = $this->packageHandler($type);
if ($handler) {
if ($handler->extractInstallContent()) {
if (!$content and $filename) {
if ($subdirectory) {
$filepath = $subdirectory . '/' . $filename . '.xml';
} else {
$filepath = $filename . '.xml';
}
$filepath = $this->path() . '/' . $filepath;
$dom = eZPackage::fetchDOMFromFile($filepath);
if ($dom) {
$content = $dom->documentElement;
} else {
eZDebug::writeError("Failed fetching dom from file {$filepath}", __METHOD__);
}
}
}
if (isset($this->InstallData[$type])) {
$installData =& $this->InstallData[$type];
} else {
unset($installData);
$installData = array();
}
$uninstallResult = $handler->uninstall($this, $type, $item, $name, $os, $filename, $subdirectory, $content, $uninstallParameters, $installData);
}
return $uninstallResult;
}