$states = array();
if ( !count( $modules ) && !count( $missing ) ) {
- return "/* This file is the Web entry point for MediaWiki's ResourceLoader:
+ return <<<MESSAGE
+/* This file is the Web entry point for MediaWiki's ResourceLoader:
<https://www.mediawiki.org/wiki/ResourceLoader>. In this request,
- no modules were requested. Max made me put this here. */";
+ no modules were requested. Max made me put this here. */
+MESSAGE;
}
$image = $context->getImageObj();
}
$handler = new SvgHandler;
- $res = $handler->rasterize( $tempFilenameSvg, $tempFilenamePng, $metadata['width'], $metadata['height'] );
+ $res = $handler->rasterize(
+ $tempFilenameSvg,
+ $tempFilenamePng,
+ $metadata['width'],
+ $metadata['height']
+ );
unlink( $tempFilenameSvg );
$png = null;
* 'prefix' => [CSS class prefix],
* // List of variants that may be used for the image files
* 'variants' => array(
- * // ([image type] is a string, used in generated CSS class names and to match variants to images)
+ * // ([image type] is a string, used in generated CSS class
+ * // names and to match variants to images)
* [image type] => array(
* [variant name] => array(
* 'color' => [color string, e.g. '#ffff00'],
- * 'global' => [boolean, if true, this variant is available for all images of this type],
+ * 'global' => [boolean, if true, this variant is available
+ * for all images of this type],
* ),
* )
* ),
* [file path string],
* [file path string] => array(
* 'name' => [image name string, defaults to file name],
- * 'variants' => [array of variant name strings, variants available for this image],
+ * 'variants' => [array of variant name strings, variants
+ * available for this image],
* ),
* )
* ),
$variantConfig = array();
}
- $image = new ResourceLoaderImage( $name, $this->getName(), $imageDesc, $this->localBasePath, $variantConfig );
+ $image = new ResourceLoaderImage(
+ $name,
+ $this->getName(),
+ $imageDesc,
+ $this->localBasePath,
+ $variantConfig
+ );
$this->imageObjects[ $image->getName() ] = $image;
}
}