Added getApplicationByID()
authorAlexander Ebert <ebert@woltlab.com>
Tue, 1 Dec 2015 13:15:28 +0000 (14:15 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 1 Dec 2015 13:15:28 +0000 (14:15 +0100)
wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php

index c9d1c85abbaf30c49c4a743f951cd5981eebb231..137a0186f46e2edb4c56e0c42326de54c6a4e944 100644 (file)
@@ -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.