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


PHP CRM_Upgrade_Form::setSchemaStructureTables方法代码示例

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


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

示例1: doIncrementalUpgradeStep

 /**
  * Perform an incremental version update.
  *
  * @param CRM_Queue_TaskContext $ctx
  * @param string $rev
  *   the target (intermediate) revision e.g '3.2.alpha1'.
  * @param string $originalVer
  *   the original revision.
  * @param string $latestVer
  *   the target (final) revision.
  * @param string $postUpgradeMessageFile
  *   path of a modifiable file which lists the post-upgrade messages.
  *
  * @return bool
  */
 public static function doIncrementalUpgradeStep(CRM_Queue_TaskContext $ctx, $rev, $originalVer, $latestVer, $postUpgradeMessageFile)
 {
     $upgrade = new CRM_Upgrade_Form();
     $phpFunctionName = 'upgrade_' . str_replace('.', '_', $rev);
     $versionObject = $upgrade->incrementalPhpObject($rev);
     // pre-db check for major release.
     if ($upgrade->checkVersionRelease($rev, 'alpha1')) {
         if (!is_callable(array($versionObject, 'verifyPreDBstate'))) {
             CRM_Core_Error::fatal("verifyPreDBstate method was not found for {$rev}");
         }
         $error = NULL;
         if (!$versionObject->verifyPreDBstate($error)) {
             if (!isset($error)) {
                 $error = "post-condition failed for current upgrade for {$rev}";
             }
             CRM_Core_Error::fatal($error);
         }
     }
     $upgrade->setSchemaStructureTables($rev);
     if (is_callable(array($versionObject, $phpFunctionName))) {
         $versionObject->{$phpFunctionName}($rev, $originalVer, $latestVer);
     } else {
         $upgrade->processSQL($rev);
     }
     // set post-upgrade-message if any
     if (is_callable(array($versionObject, 'setPostUpgradeMessage'))) {
         $postUpgradeMessage = file_get_contents($postUpgradeMessageFile);
         $versionObject->setPostUpgradeMessage($postUpgradeMessage, $rev);
         file_put_contents($postUpgradeMessageFile, $postUpgradeMessage);
     }
     return TRUE;
 }
开发者ID:nganivet,项目名称:civicrm-core,代码行数:47,代码来源:Form.php


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