From c67cc7d1fee7f74e517ce0e24b60c52ccf746fc3 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sun, 15 Jul 2012 22:09:53 +0200 Subject: [PATCH] Adds possibility to get all cached packages --- .../files/lib/data/package/PackageCache.class.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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; + } } -- 2.20.1