本文整理汇总了PHP中ExtensionManager::__getDriverPath方法的典型用法代码示例。如果您正苦于以下问题:PHP ExtensionManager::__getDriverPath方法的具体用法?PHP ExtensionManager::__getDriverPath怎么用?PHP ExtensionManager::__getDriverPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ExtensionManager
的用法示例。
在下文中一共展示了ExtensionManager::__getDriverPath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
<?php
include_once TOOLKIT . '/class.htmlpage.php';
// The extension cannot be found, show an error message and
// let the user remove or rename the extension folder.
if (isset($_POST['extension-missing'])) {
$name = $_POST['existing-folder'];
if (isset($_POST['action']['delete'])) {
Symphony::ExtensionManager()->cleanupDatabase();
} elseif (isset($_POST['action']['rename'])) {
$path = ExtensionManager::__getDriverPath($name);
if (!@rename(EXTENSIONS . '/' . $_POST['existing-folder'], EXTENSIONS . '/' . $_POST['new-folder'])) {
Symphony::Engine()->throwCustomError(__('Could not find extension %s at location %s.', array('<code>' . $name . '</code>', '<code>' . $path . '</code>')), __('Symphony Extension Missing Error'), Page::HTTP_STATUS_ERROR, 'missing_extension', array('name' => $name, 'path' => $path, 'rename_failed' => true));
}
}
redirect(SYMPHONY_URL . '/system/extensions/');
}
$Page = new HTMLPage();
$Page->Html->setElementStyle('html');
$Page->Html->setDTD('<!DOCTYPE html>');
$Page->Html->setAttribute('xml:lang', 'en');
$Page->addElementToHead(new XMLElement('meta', null, array('http-equiv' => 'Content-Type', 'content' => 'text/html; charset=UTF-8')), 0);
$Page->addStylesheetToHead(APPLICATION_URL . '/assets/css/symphony.min.css', 'screen', null, false);
$Page->setHttpStatus($e->getHttpStatusCode());
$Page->addHeaderToPage('Content-Type', 'text/html; charset=UTF-8');
$Page->addHeaderToPage('Symphony-Error-Type', 'missing-extension');
$Page->setTitle(__('%1$s – %2$s', array(__('Symphony'), $e->getHeading())));
$Page->Body->setAttribute('id', 'error');
$div = new XMLElement('div', null, array('class' => 'frame'));
$div->appendChild(new XMLElement('h1', $e->getHeading()));
$div->appendChild(new XMLElement('p', trim($e->getMessage())));