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


PHP WCF::resetZendOpcache方法代码示例

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


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

示例1: stepInstall

 /**
  * Executes installation based upon nodes.
  */
 protected function stepInstall()
 {
     $step = $this->installation->install($this->node);
     $queueID = $this->installation->nodeBuilder->getQueueByNode($this->installation->queue->processNo, $step->getNode());
     if ($step->hasDocument()) {
         $this->data = array('currentAction' => $this->getCurrentAction($queueID), 'innerTemplate' => $step->getTemplate(), 'node' => $step->getNode(), 'progress' => $this->installation->nodeBuilder->calculateProgress($this->node), 'step' => 'install', 'queueID' => $queueID);
     } else {
         if ($step->getNode() == '') {
             // perform final actions
             $this->installation->completeSetup();
             $this->finalize();
             switch (PACKAGE_ID) {
                 // redirect to application if not already within one
                 case 0:
                     // during WCFSetup
                 // during WCFSetup
                 case 1:
                     // select first installed application
                     $sql = "SELECT\t\tpackageID\n\t\t\t\t\t\t\tFROM\t\twcf" . WCF_N . "_package\n\t\t\t\t\t\t\tWHERE\t\tpackageID <> 1\n\t\t\t\t\t\t\t\t\tAND isApplication = 1\n\t\t\t\t\t\t\tORDER BY\tinstallDate ASC";
                     $statement = WCF::getDB()->prepareStatement($sql, 1);
                     $statement->execute();
                     $row = $statement->fetchArray();
                     $packageID = $row === false ? 1 : $row['packageID'];
                     break;
                 default:
                     $packageID = PACKAGE_ID;
                     break;
             }
             // get domain path
             $sql = "SELECT\t*\n\t\t\t\t\tFROM\twcf" . WCF_N . "_application\n\t\t\t\t\tWHERE\tpackageID = ?";
             $statement = WCF::getDB()->prepareStatement($sql);
             $statement->execute(array($packageID));
             $application = $statement->fetchObject('wcf\\data\\application\\Application');
             // build redirect location
             $location = $application->getPageURL() . 'acp/index.php?package-list/' . SID_ARG_2ND_NOT_ENCODED;
             WCF::resetZendOpcache();
             // show success
             $this->data = array('currentAction' => $this->getCurrentAction(null), 'progress' => 100, 'redirectLocation' => $location, 'step' => 'success');
             return;
         }
         WCF::resetZendOpcache();
         // continue with next node
         $this->data = array('currentAction' => $this->getCurrentAction($queueID), 'step' => 'install', 'node' => $step->getNode(), 'progress' => $this->installation->nodeBuilder->calculateProgress($this->node), 'queueID' => $queueID);
     }
 }
开发者ID:nick-strohm,项目名称:WCF,代码行数:48,代码来源:InstallPackageAction.class.php

示例2: rebuild

 /**
  * Rebuilds the option file.
  */
 public static function rebuild()
 {
     $writer = new AtomicWriter(WCF_DIR . 'options.inc.php');
     // file header
     $writer->write("<?php\n/**\n* generated at " . gmdate('r') . "\n*/\n");
     // get all options
     $options = Option::getOptions();
     foreach ($options as $optionName => $option) {
         $writer->write("if (!defined('" . $optionName . "')) define('" . $optionName . "', " . ($option->optionType == 'boolean' || $option->optionType == 'integer' ? intval($option->optionValue) : "'" . addcslashes($option->optionValue, "'\\") . "'") . ");\n");
     }
     unset($options);
     // file footer
     $writer->write("\n");
     $writer->flush();
     $writer->close();
     FileUtil::makeWritable(WCF_DIR . 'options.inc.php');
     WCF::resetZendOpcache(WCF_DIR . 'options.inc.php');
 }
开发者ID:nick-strohm,项目名称:WCF,代码行数:21,代码来源:OptionEditor.class.php

示例3: removeFiles

 /**
  * Removes files matching given pattern.
  * 
  * @param	string		$pattern
  */
 protected function removeFiles($pattern)
 {
     $directory = FileUtil::unifyDirSeparator(WCF_DIR . 'cache/');
     $pattern = str_replace('*', '.*', str_replace('.', '\\.', $pattern));
     $this->getDirectoryUtil()->executeCallback(new Callback(function ($filename) {
         if (!@touch($filename, 1)) {
             @unlink($filename);
             WCF::resetZendOpcache($filename);
         }
     }), new Regex('^' . $directory . $pattern . '$', Regex::CASE_INSENSITIVE));
 }
开发者ID:nick-strohm,项目名称:WCF,代码行数:16,代码来源:DiskCacheSource.class.php


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