本文整理汇总了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);
}
}
示例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');
}
示例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));
}