Added method to get application's package
authorMarcel Werk <burntime@woltlab.com>
Sun, 19 May 2013 17:19:13 +0000 (19:19 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sun, 19 May 2013 17:19:13 +0000 (19:19 +0200)
wcfsetup/install/files/lib/system/application/AbstractApplication.class.php

index da3865b50fbc7bb76e04815a311f1a9e9615cc47..80a613cd2b8e18eb3f8c6f560f37486f8b24e628 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 namespace wcf\system\application;
+use wcf\data\package\PackageCache;
 use wcf\system\exception\SystemException;
 use wcf\system\SingletonFactory;
 
@@ -60,6 +61,15 @@ abstract class AbstractApplication extends SingletonFactory implements IApplicat
                return $this->isActiveApplication;
        }
        
+       /**
+        * Returns application package.
+        * 
+        * @return      wcf\data\package\Package
+        */
+       public function getPackage() {
+               return PackageCache::getInstance()->getPackage($this->packageID);
+       }
+       
        /**
         * @see wcf\system\application\IApplication::__callStatic()
         */