Merge "resourceloader: Add $context to static functions in ResourceLoader"
[lhc/web/wiklou.git] / includes / resourceloader / ResourceLoaderFileModule.php
index 6c21e4b..3388058 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 /**
- * ResourceLoader module based on local JavaScript/CSS files.
- *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  */
 
 /**
- * ResourceLoader module based on local JavaScript/CSS files.
+ * Module based on local JavaScript/CSS files.
  *
  * The following public methods can query the database:
  *
  * - getDefinitionSummary / … / ResourceLoaderModule::getFileDependencies.
  * - getVersionHash / getDefinitionSummary / … / ResourceLoaderModule::getFileDependencies.
  * - getStyles / ResourceLoaderModule::saveFileDependencies.
+ *
+ * @ingroup ResourceLoader
+ * @since 1.17
  */
 class ResourceLoaderFileModule extends ResourceLoaderModule {
 
@@ -905,7 +906,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         *     keyed by media type
         * @throws MWException
         */
-       public function readStyleFiles( array $styles, $flip, $context ) {
+       public function readStyleFiles( array $styles, $flip, ResourceLoaderContext $context ) {
                if ( !$styles ) {
                        return [];
                }
@@ -932,7 +933,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * @return string CSS data in script file
         * @throws MWException If the file doesn't exist
         */
-       protected function readStyleFile( $path, $flip, $context ) {
+       protected function readStyleFile( $path, $flip, ResourceLoaderContext $context ) {
                $localPath = $this->getLocalPath( $path );
                $remotePath = $this->getRemotePath( $path );
                if ( !file_exists( $localPath ) ) {
@@ -972,7 +973,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
         * @param ResourceLoaderContext $context
         * @return bool
         */
-       public function getFlip( $context ) {
+       public function getFlip( ResourceLoaderContext $context ) {
                return $context->getDirection() === 'rtl' && !$this->noflip;
        }