當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。