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


PHP StringUtil::getUUID方法代码示例

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


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

示例1: install

 /**
  * Installs node components and returns next node.
  * 
  * @param	string		$node
  * @return	\wcf\system\package\PackageInstallationStep
  */
 public function install($node)
 {
     $nodes = $this->nodeBuilder->getNodeData($node);
     // invoke node-specific actions
     foreach ($nodes as $data) {
         $nodeData = unserialize($data['nodeData']);
         switch ($data['nodeType']) {
             case 'package':
                 $step = $this->installPackage($nodeData);
                 break;
             case 'pip':
                 $step = $this->executePIP($nodeData);
                 break;
             case 'optionalPackages':
                 $step = $this->selectOptionalPackages($node, $nodeData);
                 break;
             default:
                 die("Unknown node type: '" . $data['nodeType'] . "'");
                 break;
         }
         if ($step->splitNode()) {
             $this->nodeBuilder->cloneNode($node, $data['sequenceNo']);
             break;
         }
     }
     // mark node as completed
     $this->nodeBuilder->completeNode($node);
     // assign next node
     $tmp = $node;
     $node = $this->nodeBuilder->getNextNode($node);
     $step->setNode($node);
     // perform post-install/update actions
     if ($node == '') {
         // update "last update time" option
         $sql = "UPDATE\twcf" . WCF_N . "_option\n\t\t\t\tSET\toptionValue = ?\n\t\t\t\tWHERE\toptionName = ?";
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute(array(TIME_NOW, 'last_update_time'));
         // update options.inc.php
         OptionEditor::resetCache();
         if ($this->action == 'install') {
             // save localized package infos
             $this->saveLocalizedPackageInfos();
             // remove all cache files after WCFSetup
             if (!PACKAGE_ID) {
                 CacheHandler::getInstance()->flushAll();
                 $sql = "UPDATE\twcf" . WCF_N . "_option\n\t\t\t\t\t\tSET\toptionValue = ?\n\t\t\t\t\t\tWHERE\toptionName = ?";
                 $statement = WCF::getDB()->prepareStatement($sql);
                 $statement->execute(array(StringUtil::getUUID(), 'wcf_uuid'));
                 if (WCF::getSession()->getVar('__wcfSetup_developerMode')) {
                     $statement->execute(array(1, 'enable_debug_mode'));
                 }
                 // update options.inc.php
                 OptionEditor::resetCache();
             }
             // rebuild application paths
             ApplicationHandler::rebuild();
             ApplicationEditor::setup();
         }
         // remove template listener cache
         TemplateListenerCodeCacheBuilder::getInstance()->reset();
         // reset language cache
         LanguageFactory::getInstance()->clearCache();
         LanguageFactory::getInstance()->deleteLanguageCache();
         // reset stylesheets
         StyleHandler::resetStylesheets();
         // clear user storage
         UserStorageHandler::getInstance()->clear();
         // rebuild config files for affected applications
         $sql = "SELECT\t\tpackage.packageID\n\t\t\t\tFROM\t\twcf" . WCF_N . "_package_installation_queue queue,\n\t\t\t\t\t\twcf" . WCF_N . "_package package\n\t\t\t\tWHERE\t\tqueue.processNo = ?\n\t\t\t\t\t\tAND package.packageID = queue.packageID\n\t\t\t\t\t\tAND package.packageID <> ?\n\t\t\t\t\t\tAND package.isApplication = ?";
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute(array($this->queue->processNo, 1, 1));
         while ($row = $statement->fetchArray()) {
             Package::writeConfigFile($row['packageID']);
         }
         EventHandler::getInstance()->fireAction($this, 'postInstall');
         // remove archives
         $sql = "SELECT\tarchive\n\t\t\t\tFROM\twcf" . WCF_N . "_package_installation_queue\n\t\t\t\tWHERE\tprocessNo = ?";
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute(array($this->queue->processNo));
         while ($row = $statement->fetchArray()) {
             @unlink($row['archive']);
         }
         // delete queues
         $sql = "DELETE FROM\twcf" . WCF_N . "_package_installation_queue\n\t\t\t\tWHERE\t\tprocessNo = ?";
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute(array($this->queue->processNo));
     }
     if ($this->requireRestructureVersionTables) {
         $this->restructureVersionTables();
     }
     return $step;
 }
开发者ID:nick-strohm,项目名称:WCF,代码行数:98,代码来源:PackageInstallationDispatcher.class.php


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