當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PackageList::refreshCache方法代碼示例

本文整理匯總了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;
 }
開發者ID:ppiedaderawnet,項目名稱:concrete5,代碼行數:23,代碼來源:Package.php

示例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;
 }
開發者ID:meixelsberger,項目名稱:concrete5-5.7.0,代碼行數:18,代碼來源:Package.php

示例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;
 }
開發者ID:ceko,項目名稱:concrete5-1,代碼行數:20,代碼來源:Package.php


注:本文中的Concrete\Core\Package\PackageList::refreshCache方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。