本文整理汇总了PHP中PackageList::refreshCache方法的典型用法代码示例。如果您正苦于以下问题:PHP PackageList::refreshCache方法的具体用法?PHP PackageList::refreshCache怎么用?PHP PackageList::refreshCache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PackageList
的用法示例。
在下文中一共展示了PackageList::refreshCache方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: install
/**
* @return Package
*/
public function install()
{
PackageList::refreshCache();
$db = Loader::db();
$dh = Loader::helper('date');
$v = array($this->getPackageName(), $this->getPackageDescription(), $this->getPackageVersion(), $this->getPackageHandle(), 1, $dh->getSystemDateTime());
$db->query("insert into Packages (pkgName, pkgDescription, pkgVersion, pkgHandle, pkgIsInstalled, pkgDateInstalled) values (?, ?, ?, ?, ?, ?)", $v);
$pkg = Package::getByID($db->Insert_ID());
Package::installDB($pkg->getPackagePath() . '/' . FILENAME_PACKAGE_DB);
$env = Environment::get();
$env->clearOverrideCache();
return $pkg;
}
示例2: upgradeCoreData
public function upgradeCoreData() {
$db = Loader::db();
$p1 = Loader::package($this->getPackageHandle());
$v = array($p1->getPackageName(), $p1->getPackageDescription(), $p1->getPackageVersion(), $this->getPackageID());
$db->query("update Packages set pkgName = ?, pkgDescription = ?, pkgVersion = ? where pkgID = ?", $v);
PackageList::refreshCache();
}