当前位置: 首页>>代码示例>>PHP>>正文


PHP JInstaller::set方法代码示例

本文整理汇总了PHP中JInstaller::set方法的典型用法代码示例。如果您正苦于以下问题:PHP JInstaller::set方法的具体用法?PHP JInstaller::set怎么用?PHP JInstaller::set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JInstaller的用法示例。


在下文中一共展示了JInstaller::set方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: triggerManifestScript

 /**
  * Executes a custom install script method
  *
  * @param   string  $method  The install method to execute
  *
  * @return  boolean  True on success
  *
  * @since   3.4
  * @throws  RuntimeException
  */
 protected function triggerManifestScript($method)
 {
     ob_start();
     ob_implicit_flush(false);
     if ($this->parent->manifestClass && method_exists($this->parent->manifestClass, $method)) {
         switch ($method) {
             // The preflight and postflight take the route as a param
             case 'preflight':
             case 'postflight':
                 if ($this->parent->manifestClass->{$method}($this->route, $this) === false) {
                     if ($method != 'postflight') {
                         // Clean and close the output buffer
                         ob_end_clean();
                         // The script failed, rollback changes
                         throw new RuntimeException(JText::sprintf('JLIB_INSTALLER_ABORT_INSTALL_CUSTOM_INSTALL_FAILURE', JText::_('JLIB_INSTALLER_' . $this->route)));
                     }
                 }
                 break;
                 // The install, uninstall, and update methods only pass this object as a param
             // The install, uninstall, and update methods only pass this object as a param
             case 'install':
             case 'uninstall':
             case 'update':
                 if ($this->parent->manifestClass->{$method}($this) === false) {
                     if ($method != 'uninstall') {
                         // Clean and close the output buffer
                         ob_end_clean();
                         // The script failed, rollback changes
                         throw new RuntimeException(JText::sprintf('JLIB_INSTALLER_ABORT_INSTALL_CUSTOM_INSTALL_FAILURE', JText::_('JLIB_INSTALLER_' . $this->route)));
                     }
                 }
                 break;
         }
     }
     // Append to the message object
     $this->extensionMessage .= ob_get_clean();
     // If in postflight or uninstall, set the message for display
     if (($method == 'uninstall' || $method == 'postflight') && $this->extensionMessage != '') {
         $this->parent->set('extension_message', $this->extensionMessage);
     }
     return true;
 }
开发者ID:Rai-Ka,项目名称:joomla-cms,代码行数:52,代码来源:adapter.php

示例2: onExtensionAfterUpdate

 public function onExtensionAfterUpdate($installer, $eid)
 {
     $lang = JFactory::getLanguage();
     $lang->load('install_override', dirname(__FILE__), $lang->getTag(), true);
     $this->toplevel_installer->set('extension_message', $this->getMessages());
 }
开发者ID:elektroschmock,项目名称:Afterburner2,代码行数:6,代码来源:RokInstallerEvents.php


注:本文中的JInstaller::set方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。