本文整理汇总了PHP中EventUtil::unregisterPersistentModuleHandler方法的典型用法代码示例。如果您正苦于以下问题:PHP EventUtil::unregisterPersistentModuleHandler方法的具体用法?PHP EventUtil::unregisterPersistentModuleHandler怎么用?PHP EventUtil::unregisterPersistentModuleHandler使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EventUtil
的用法示例。
在下文中一共展示了EventUtil::unregisterPersistentModuleHandler方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: uninstall
/**
* delete the module
*
* @author Francesc Bassas i Bullich
* @return bool true if successful, false otherwise
*/
public function uninstall() {
// Delete all module variables
$this->delVar('SiriusXtecMailer');
EventUtil::unregisterPersistentModuleHandler('SiriusXtecMailer');
// Deletion successful
return true;
}
示例2: uninstall
/**
* delete the comments module
*
*/
public function uninstall() {
// drop tables
$tables = array('IWstats', 'IWstats_summary');
foreach ($tables as $table) {
if (!DBUtil::dropTable($table)) {
return false;
}
}
// delete config variables
$this->delVars();
// delete the system init hook
EventUtil::unregisterPersistentModuleHandler('IWstats', 'core.postinit', array('IWstats_Listeners', 'coreinit'));
// Deletion successful
return true;
}
示例3: uninstall
/**
* Remove SiriusXtecAuth module and all associative information.
*/
public function uninstall()
{
$this->delVars;
EventUtil::unregisterPersistentModuleHandler('SiriusXtecAuth');
return true;
}
示例4: uninstall
public function uninstall()
{
// drop table
if (!DBUtil::dropTable('scribite')) {
return false;
}
// Delete any module variables
$this->delVars();
EventUtil::unregisterPersistentModuleHandler('Scribite', 'core.postinit', array('Scribite_Listeners', 'coreinit'));
// Deletion successful
return true;
}
示例5: uninstall
/**
* Delete module
*
* @return boolean true/false
*/
public function uninstall()
{
$table_prefix = ModUtil::getVar('ZphpBB2', 'table_prefix', 'phpbb_');
$tablenames = ZphpBB2_Util::getTableNames();
$connection = Doctrine_Manager::getInstance()->getCurrentConnection();
// str_replace is because _ is wildcard character, as %
$stmt = $connection->prepare("SHOW TABLES LIKE '" . str_replace('_', '\\_', $table_prefix) . "%'");
try {
$stmt->execute();
} catch (Exception $e) {
return LogUtil::registerError(__('Error: ') . $e->getMessage());
}
$items = $stmt->fetchAll(Doctrine_Core::FETCH_NUM);
foreach ($items as $item) {
$table_stem = ZphpBB2_Util::getTableStem($item[0], $table_prefix);
if (in_array($table_stem, $tablenames)) {
$stmt = $connection->prepare("DROP TABLE `" . $item[0] . "`");
try {
$stmt->execute();
} catch (Exception $e) {
return LogUtil::registerError(__('Error: ') . $e->getMessage());
}
}
}
// Unregister event handlers
EventUtil::unregisterPersistentModuleHandler('ZphpBB2', 'user.account.create', array('ZphpBB2_Listener_UsersSynch', 'createAccountListener'));
EventUtil::unregisterPersistentModuleHandler('ZphpBB2', 'user.account.update', array('ZphpBB2_Listener_UsersSynch', 'updateAccountListener'));
EventUtil::unregisterPersistentModuleHandler('ZphpBB2', 'user.account.delete', array('ZphpBB2_Listener_UsersSynch', 'deleteAccountListener'));
return true;
}
示例6: uninstall
/**
* delete the EZComments module from an old version
*
* This function deletes the module to be used. It deletes tables,
* registers hooks,...
*
* @return boolean true on success, false otherwise.
*/
public function uninstall()
{
if (!ModUtil::unregisterHook('item', 'display', 'GUI', 'EZComments', 'user', 'view')) {
return LogUtil::registerError($this->__('Error deleting hook.'));
}
if (!ModUtil::unregisterHook('item', 'delete', 'API', 'EZComments', 'admin', 'deletebyitem')) {
return LogUtil::registerError($this->__('Error deleting hook.'));
}
if (!ModUtil::unregisterHook('module', 'remove', 'API', 'EZComments', 'admin', 'deletemodule')) {
return LogUtil::registerError($this->__('Error deleting hook.'));
}
// drop main table
if (!DBUtil::dropTable('EZComments')) {
return false;
}
// delete all module vars for the ezcomments module
$this->delVars();
HookUtil::unregisterProviderBundles($this->version->getHookProviderBundles());
HookUtil::unregisterSubscriberBundles($this->version->getHookSubscriberBundles());
EventUtil::unregisterPersistentModuleHandler('EZComments', 'installer.module.uninstalled', array('EZComments_EventHandlers', 'moduleDelete'));
EventUtil::unregisterPersistentModuleHandler('EZComments', 'installer.subscriberarea.uninstalled', array('EZComments_EventHandlers', 'hookAreaDelete'));
// Deletion successful
return true;
}