當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Updater::processMetadataElements方法代碼示例

本文整理匯總了PHP中Updater::processMetadataElements方法的典型用法代碼示例。如果您正苦於以下問題:PHP Updater::processMetadataElements方法的具體用法?PHP Updater::processMetadataElements怎麽用?PHP Updater::processMetadataElements使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Updater的用法示例。


在下文中一共展示了Updater::processMetadataElements方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: install

 /**
  * Create a fresh installation of CollectiveAccess based on contents of setup.php.  This is essentially a CLI
  * command wrapper for the installation process, as /install/inc/page2.php is a web wrapper.
  * @param Zend_Console_Getopt $po_opts
  * @param bool $pb_installing
  * @return bool
  */
 public static function install($po_opts = null, $pb_installing = true)
 {
     require_once __CA_BASE_DIR__ . '/install/inc/Installer.php';
     require_once __CA_BASE_DIR__ . '/install/inc/Updater.php';
     if ($pb_installing && !$po_opts->getOption('profile-name')) {
         CLIUtils::addError(_t("Missing required parameter: profile-name"));
         return false;
     }
     if ($pb_installing && !$po_opts->getOption('admin-email')) {
         CLIUtils::addError(_t("Missing required parameter: admin-email"));
         return false;
     }
     $vs_profile_directory = $po_opts->getOption('profile-directory');
     $vs_profile_directory = $vs_profile_directory ? $vs_profile_directory : __CA_BASE_DIR__ . '/install/profiles/xml';
     $t_total = new Timer();
     // If we are installing, then use Installer, otherwise use Updater
     $vo_installer = null;
     if ($pb_installing) {
         $vo_installer = new Installer($vs_profile_directory, $po_opts->getOption('profile-name'), $po_opts->getOption('admin-email'), $po_opts->getOption('overwrite'), $po_opts->getOption('debug'));
     } else {
         $vo_installer = new Updater($vs_profile_directory, $po_opts->getOption('profile-name'), null, false, $po_opts->getOption('debug'));
     }
     $vb_quiet = $po_opts->getOption('quiet');
     // if profile validation against XSD failed, we already have an error here
     if ($vo_installer->numErrors()) {
         CLIUtils::addError(_t("There were errors parsing the profile(s): %1", "\n * " . join("\n * ", $vo_installer->getErrors())));
         return false;
     }
     if ($pb_installing) {
         if (!$vb_quiet) {
             CLIUtils::addMessage(_t("Performing preinstall tasks"));
         }
         $vo_installer->performPreInstallTasks();
         if (!$vb_quiet) {
             CLIUtils::addMessage(_t("Loading schema"));
         }
         $vo_installer->loadSchema();
         if ($vo_installer->numErrors()) {
             CLIUtils::addError(_t("There were errors loading the database schema: %1", "\n * " . join("\n * ", $vo_installer->getErrors())));
             return false;
         }
     }
     if (!$vb_quiet) {
         CLIUtils::addMessage(_t("Processing locales"));
     }
     $vo_installer->processLocales();
     if (!$vb_quiet) {
         CLIUtils::addMessage(_t("Processing lists"));
     }
     $vo_installer->processLists();
     if (!$vb_quiet) {
         CLIUtils::addMessage(_t("Processing relationship types"));
     }
     $vo_installer->processRelationshipTypes();
     if (!$vb_quiet) {
         CLIUtils::addMessage(_t("Processing metadata elements"));
     }
     $vo_installer->processMetadataElements();
     if (!$vb_quiet) {
         CLIUtils::addMessage(_t("Processing metadata dictionary"));
     }
     $vo_installer->processMetadataDictionary();
     if (!$po_opts->getOption('skip-roles')) {
         if (!$vb_quiet) {
             CLIUtils::addMessage(_t("Processing access roles"));
         }
         $vo_installer->processRoles();
     }
     if (!$vb_quiet) {
         CLIUtils::addMessage(_t("Processing user groups"));
     }
     $vo_installer->processGroups();
     if (!$vb_quiet) {
         CLIUtils::addMessage(_t("Processing user logins"));
     }
     $va_login_info = $vo_installer->processLogins();
     if (!$vb_quiet) {
         CLIUtils::addMessage(_t("Processing user interfaces"));
     }
     $vo_installer->processUserInterfaces();
     if (!$vb_quiet) {
         CLIUtils::addMessage(_t("Processing displays"));
     }
     $vo_installer->processDisplays();
     if (!$vb_quiet) {
         CLIUtils::addMessage(_t("Processing search forms"));
     }
     $vo_installer->processSearchForms();
     if (!$vb_quiet) {
         CLIUtils::addMessage(_t("Setting up hierarchies"));
     }
     $vo_installer->processMiscHierarchicalSetup();
     if (!$vb_quiet) {
//.........這裏部分代碼省略.........
開發者ID:idiscussforum,項目名稱:providence,代碼行數:101,代碼來源:CLIUtils.php


注:本文中的Updater::processMetadataElements方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。