From: Matthias Schmidt Date: Sun, 15 Jul 2012 20:09:53 +0000 (+0200) Subject: Adds possibility to get all cached packages X-Git-Tag: 2.0.0_Beta_1~987^2~2^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c67cc7d1fee7f74e517ce0e24b60c52ccf746fc3;p=GitHub%2FWoltLab%2FWCF.git Adds possibility to get all cached packages --- diff --git a/wcfsetup/install/files/lib/data/package/PackageCache.class.php b/wcfsetup/install/files/lib/data/package/PackageCache.class.php index 3304a603fe..7ef0a8cd19 100644 --- a/wcfsetup/install/files/lib/data/package/PackageCache.class.php +++ b/wcfsetup/install/files/lib/data/package/PackageCache.class.php @@ -24,7 +24,11 @@ class PackageCache extends SingletonFactory { * @see wcf\system\SingletonFactory::init() */ protected function init() { - CacheHandler::getInstance()->addResource('package', WCF_DIR.'cache/cache.package.php', 'wcf\system\cache\builder\PackageCacheBuilder'); + CacheHandler::getInstance()->addResource( + 'package', + WCF_DIR.'cache/cache.package.php', + 'wcf\system\cache\builder\PackageCacheBuilder' + ); $this->packages = CacheHandler::getInstance()->get('package'); } @@ -39,4 +43,13 @@ class PackageCache extends SingletonFactory { return null; } + + /** + * Returns all packages. + * + * @return array + */ + public function getPackages() { + return $this->packages; + } }