本文整理汇总了PHP中Concrete\Core\Package\PackageList::refreshCache方法的典型用法代码示例。如果您正苦于以下问题:PHP PackageList::refreshCache方法的具体用法?PHP PackageList::refreshCache怎么用?PHP PackageList::refreshCache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Concrete\Core\Package\PackageList
的用法示例。
在下文中一共展示了PackageList::refreshCache方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: install
/**
* Installs the package info row and installs the database. Packages installing additional content should override this method, call the parent method,
* and use the resulting package object for further installs.
*
* @return Package
*/
public function install()
{
PackageList::refreshCache();
$em = \Database::connection()->getEntityManager();
$package = new \Concrete\Core\Entity\Package();
$package->setPackageName($this->getPackageName());
$package->setPackageDescription($this->getPackageDescription());
$package->setPackageVersion($this->getPackageVersion());
$package->setPackageHandle($this->getPackageHandle());
$em->persist($package);
$em->flush();
$this->installDatabase();
$env = \Environment::get();
$env->clearOverrideCache();
\Localization::clearCache();
return $package;
}
示例2: install
/**
* @return Package
*/
public function install()
{
$cl = \Concrete\Core\Foundation\ClassLoader::getInstance();
$cl->registerPackage($this);
PackageList::refreshCache();
$db = Loader::db();
$dh = Loader::helper('date');
$v = array($this->getPackageName(), $this->getPackageDescription(), $this->getPackageVersion(), $this->getPackageHandle(), 1, $dh->getOverridableNow());
$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;
}
示例3: install
/**
* Installs the package info row and installs the database. Packages installing additional content should override this method, call the parent method,
* and use the resulting package object for further installs.
* @return Package
*/
public function install()
{
PackageList::refreshCache();
$db = Database::getActiveConnection();
$dh = Core::make('helper/date');
$v = array($this->getPackageName(), $this->getPackageDescription(), $this->getPackageVersion(), $this->getPackageHandle(), 1, $dh->getOverridableNow());
$db->query("INSERT INTO Packages (pkgName, pkgDescription, pkgVersion, pkgHandle, pkgIsInstalled, pkgDateInstalled) VALUES (?, ?, ?, ?, ?, ?)", $v);
$pkg = Package::getByID($db->lastInsertId());
ClassLoader::getInstance()->registerPackage($pkg);
$pkg->installDatabase();
$env = Environment::get();
$env->clearOverrideCache();
Localization::clearCache();
return $pkg;
}