From: Alexander Ebert Date: Tue, 1 Dec 2015 13:15:28 +0000 (+0100) Subject: Added getApplicationByID() X-Git-Tag: 3.0.0_Beta_1~2030^2~218 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=02c1a7feeef0c609136784f38d5f67661f421200;p=GitHub%2FWoltLab%2FWCF.git Added getApplicationByID() --- diff --git a/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php b/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php index c9d1c85abb..137a0186f4 100644 --- a/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php +++ b/wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php @@ -75,6 +75,20 @@ class ApplicationHandler extends SingletonFactory { return null; } + /** + * Returns an application by package id. + * + * @param integer $packageID package id + * @return Application application object + */ + public function getApplicationByID($packageID) { + if (isset($this->cache['application'][$packageID])) { + return $this->cache['application'][$packageID]; + } + + return null; + } + /** * Returns pseudo-application representing WCF used for special cases, * e.g. cross-domain files requestable through the webserver.