当前位置: 首页>>代码示例>>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;未经允许,请勿转载。