本文整理汇总了PHP中wcf\system\WCF::loadRuntimeApplication方法的典型用法代码示例。如果您正苦于以下问题:PHP WCF::loadRuntimeApplication方法的具体用法?PHP WCF::loadRuntimeApplication怎么用?PHP WCF::loadRuntimeApplication使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wcf\system\WCF
的用法示例。
在下文中一共展示了WCF::loadRuntimeApplication方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: install
/**
* @see \wcf\system\package\plugin\IPackageInstallationPlugin::install()
*/
public function install()
{
parent::install();
$abbreviation = 'wcf';
if (isset($this->instruction['attributes']['application'])) {
$abbreviation = $this->instruction['attributes']['application'];
} else {
if ($this->installation->getPackage()->isApplication) {
$abbreviation = Package::getAbbreviation($this->installation->getPackage()->package);
}
}
// absolute path to package dir
$packageDir = Application::getDirectory($abbreviation);
// extract files.tar to temp folder
$sourceFile = $this->installation->getArchive()->extractTar($this->instruction['value'], 'files_');
// create file handler
$fileHandler = new FilesFileHandler($this->installation, $abbreviation);
// extract content of files.tar
$fileInstaller = $this->installation->extractFiles($packageDir, $sourceFile, $fileHandler);
// if this a an application, write config.inc.php for this package
if ($this->installation->getPackage()->isApplication == 1 && $this->installation->getPackage()->package != 'com.woltlab.wcf' && $this->installation->getAction() == 'install' && $abbreviation != 'wcf') {
// touch file
$fileInstaller->touchFile(PackageInstallationDispatcher::CONFIG_FILE);
// create file
Package::writeConfigFile($this->installation->getPackageID());
// log file
$sql = "INSERT INTO\twcf" . WCF_N . "_package_installation_file_log\n\t\t\t\t\t\t(packageID, filename, application)\n\t\t\t\tVALUES\t\t(?, ?, ?)";
$statement = WCF::getDB()->prepareStatement($sql);
$statement->execute(array($this->installation->getPackageID(), 'config.inc.php', Package::getAbbreviation($this->installation->getPackage()->package)));
// load application
WCF::loadRuntimeApplication($this->installation->getPackageID());
}
// delete temporary sourceArchive
@unlink($sourceFile);
// update acp style file
StyleUtil::updateStyleFile();
}