Merge "Always return something nice in Language::translateBlockExpiry()"
[lhc/web/wiklou.git] / includes / resourceloader / ResourceLoaderModule.php
index e364b71..0e170fb 100644 (file)
@@ -77,7 +77,7 @@ abstract class ResourceLoaderModule {
        }
 
        /**
-        * Set this module's name. This is called by ResourceLodaer::register()
+        * Set this module's name. This is called by ResourceLoader::register()
         * when registering the module. Other code should not call this.
         *
         * @param $name String: Name
@@ -91,7 +91,7 @@ abstract class ResourceLoaderModule {
         * with ResourceLoader::register()
         *
         * @return Int ResourceLoaderModule class constant, the subclass default
-        *     if not set manuall
+        *     if not set manually
         */
        public function getOrigin() {
                return $this->origin;
@@ -376,7 +376,7 @@ abstract class ResourceLoaderModule {
         * NOTE: The mtime of the module's messages is NOT automatically included.
         * If you want this to happen, you'll need to call getMsgBlobMtime()
         * yourself and take its result into consideration.
-        * 
+        *
         * @param $context ResourceLoaderContext: Context object
         * @return Integer: UNIX timestamp
         */
@@ -450,4 +450,13 @@ abstract class ResourceLoaderModule {
                return self::$jsParser;
        }
 
+       /**
+        * Get target(s) for the module, eg ['desktop'] or ['desktop', 'mobile']
+        * Default implementation hardcodes 'desktop'.
+        *
+        * @return array of strings
+        */
+       public function getTargets() {
+               return array( 'desktop' );
+       }
 }