<?php
/**
- * Derivative context for ResourceLoader modules.
- *
* 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
*/
/**
+ * A mutable version of ResourceLoaderContext.
+ *
* Allows changing specific properties of a context object,
- * without changing the main one. Inspired by DerivativeContext.
+ * without changing the main one. Inspired by MediaWiki's DerivativeContext.
*
+ * @ingroup ResourceLoader
* @since 1.24
*/
class DerivativeResourceLoaderContext extends ResourceLoaderContext {
use Wikimedia\Rdbms\Database;
/**
- * This class generates message blobs for use by ResourceLoader modules.
+ * This class generates message blobs for use by ResourceLoader.
*
- * A message blob is a JSON object containing the interface messages for a certain module in
- * a certain language.
+ * A message blob is a JSON object containing the interface messages for a
+ * certain module in a certain language.
+ *
+ * @ingroup ResourceLoader
+ * @since 1.17
*/
class MessageBlobStore implements LoggerAwareInterface {
<?php
/**
- * Base class for resource loading system.
- *
* 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
use Wikimedia\WrappedString;
/**
- * Dynamic JavaScript and CSS resource loading system.
+ * @defgroup ResourceLoader ResourceLoader
+ *
+ * For higher level documentation, see <https://www.mediawiki.org/wiki/ResourceLoader/Architecture>.
+ */
+
+/**
+ * ResourceLoader is a loading system for JavaScript and CSS resources.
+ *
+ * For higher level documentation, see <https://www.mediawiki.org/wiki/ResourceLoader/Architecture>.
*
- * Most of the documentation is on the MediaWiki documentation wiki starting at:
- * https://www.mediawiki.org/wiki/ResourceLoader
+ * @ingroup ResourceLoader
+ * @since 1.17
*/
class ResourceLoader implements LoggerAwareInterface {
- /** @var Config $config */
+ /** @var Config */
protected $config;
/** @var MessageBlobStore */
protected $blobStore;
<?php
/**
- *
* 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
*/
/**
+ * @ingroup ResourceLoader
* @internal For use by ResourceLoaderStartUpModule only
*/
class ResourceLoaderCircularDependencyError extends Exception {
/**
* Load and configure a ResourceLoader client on an HTML page.
*
+ * @ingroup ResourceLoader
* @since 1.28
*/
class ResourceLoaderClientHtml {
<?php
/**
- * Context for ResourceLoader modules.
- *
* 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
use MediaWiki\MediaWikiServices;
/**
- * Object passed around to modules which contains information about the state
- * of a specific loader request.
+ * Context object that contains information about the state of a specific
+ * ResourceLoader web request. Passed around to ResourceLoaderModule methods.
+ *
+ * @ingroup ResourceLoader
+ * @since 1.17
*/
class ResourceLoaderContext implements MessageLocalizer {
const DEFAULT_LANG = 'qqx';
<?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 {
<?php
/**
- * An object to represent a path to a JavaScript/CSS file, along with a remote
- * and local base path, for use with ResourceLoaderFileModule.
- *
* 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
/**
* An object to represent a path to a JavaScript/CSS file, along with a remote
* and local base path, for use with ResourceLoaderFileModule.
+ *
+ * @ingroup ResourceLoader
+ * @since 1.17
*/
class ResourceLoaderFilePath {
<?php
/**
- * ResourceLoader module for mediawiki.ForeignApi that has dynamically
- * generated dependencies, via a hook usable by extensions.
- *
* 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 for mediawiki.ForeignApi and its generated data
+ * Module for mediawiki.ForeignApi that has dynamically
+ * generated dependencies, via a hook usable by extensions.
+ *
+ * @ingroup ResourceLoader
+ * @internal
*/
class ResourceLoaderForeignApiModule extends ResourceLoaderFileModule {
public function getDependencies( ResourceLoaderContext $context = null ) {
<?php
/**
- * Class encapsulating an image used in a ResourceLoaderImageModule.
- *
* 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
/**
* Class encapsulating an image used in a ResourceLoaderImageModule.
*
+ * @ingroup ResourceLoader
* @since 1.25
*/
class ResourceLoaderImage {
<?php
/**
- * ResourceLoader module for generated and embedded images.
- *
* 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 for generated and embedded images.
+ * Module for generated and embedded images.
*
+ * @ingroup ResourceLoader
* @since 1.25
*/
class ResourceLoaderImageModule extends ResourceLoaderModule {
*/
/**
- * ResourceLoader module for populating language specific data, such as grammar forms.
+ * Module for populating language specific data, such as grammar forms.
+ *
+ * @ingroup ResourceLoader
+ * @internal
*/
class ResourceLoaderLanguageDataModule extends ResourceLoaderFileModule {
<?php
+/**
+ * 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
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
/**
- * Subclass with context specific LESS variables
+ * Module augmented with context-specific LESS variables.
+ *
+ * @ingroup ResourceLoader
+ * @since 1.32
*/
class ResourceLoaderLessVarFileModule extends ResourceLoaderFileModule {
protected $lessVariables = [];
<?php
/**
- * Abstraction for ResourceLoader modules.
- *
* 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
/**
* Abstraction for ResourceLoader modules, with name registration and maxage functionality.
+ *
+ * @ingroup ResourceLoader
+ * @since 1.17
*/
abstract class ResourceLoaderModule implements LoggerAwareInterface {
/** @var Config */
*/
/**
- * ResourceLoaderFileModule which magically loads the right skinScripts and skinStyles for every
+ * Module which magically loads the right skinScripts and skinStyles for every
* skin, using the specified OOUI theme for each.
*
- * @since 1.30
+ * @ingroup ResourceLoader
+ * @internal
*/
class ResourceLoaderOOUIFileModule extends ResourceLoaderFileModule {
use ResourceLoaderOOUIModule;
/**
* Allows loading arbitrary sets of OOUI icons.
*
+ * @ingroup ResourceLoader
* @since 1.34
*/
class ResourceLoaderOOUIIconPackModule extends ResourceLoaderOOUIImageModule {
/**
* Convenience methods for dealing with OOUI themes and their relations to MW skins.
*
- * @since 1.30
+ * @ingroup ResourceLoader
+ * @internal
*/
trait ResourceLoaderOOUIModule {
protected static $knownScriptsModules = [ 'core' ];
<?php
/**
- * ResourceLoader module for site customizations.
- *
* 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
*/
/**
- * Module for site customizations
+ * Module for site customizations.
+ *
+ * @ingroup ResourceLoader
+ * @internal
*/
class ResourceLoaderSiteModule extends ResourceLoaderWikiModule {
<?php
/**
- * ResourceLoader module for site style customizations.
- *
* 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
*/
/**
- * Module for site style customizations
+ * Module for site style customizations.
+ *
+ * @ingroup ResourceLoader
+ * @internal
*/
class ResourceLoaderSiteStylesModule extends ResourceLoaderWikiModule {
*/
/**
- * ResourceLoader module for skin stylesheets.
+ * Module for skin stylesheets.
+ *
+ * @ingroup ResourceLoader
+ * @internal
*/
class ResourceLoaderSkinModule extends ResourceLoaderFileModule {
/**
* - safemode: Only register modules that have ORIGIN_CORE as their origin.
* This effectively disables ORIGIN_USER modules. (T185303)
* See also: OutputPage::disallowUserJs()
+ *
+ * @ingroup ResourceLoader
+ * @internal
*/
class ResourceLoaderStartUpModule extends ResourceLoaderModule {
protected $targets = [ 'desktop', 'mobile' ];
<?php
/**
- * ResourceLoader module for default user preferences.
- *
* 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
/**
* Module for default user preferences.
+ *
+ * @ingroup ResourceLoader
+ * @internal
*/
class ResourceLoaderUserDefaultsModule extends ResourceLoaderModule {
*/
/**
- * Module for user customizations scripts
+ * Module for user customizations scripts.
+ *
+ * @ingroup ResourceLoader
+ * @internal
*/
class ResourceLoaderUserModule extends ResourceLoaderWikiModule {
<?php
/**
- * ResourceLoader module for user preference customizations.
- *
* 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
*/
/**
- * Module for user preference customizations
+ * Module for user preferences.
+ *
+ * @ingroup ResourceLoader
+ * @internal
*/
class ResourceLoaderUserOptionsModule extends ResourceLoaderModule {
*/
/**
- * Module for user customizations styles
+ * Module for user customizations styles.
+ *
+ * @ingroup ResourceLoader
+ * @internal
*/
class ResourceLoaderUserStylesModule extends ResourceLoaderWikiModule {
<?php
/**
- * ResourceLoader module for user tokens.
- *
* 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
* http://www.gnu.org/copyleft/gpl.html
*
* @file
- * @author Krinkle
*/
/**
- * Module for user tokens
+ * Module for user authorization tokens.
+ *
+ * @ingroup ResourceLoader
+ * @internal
*/
class ResourceLoaderUserTokensModule extends ResourceLoaderModule {
<?php
/**
- * Abstraction for ResourceLoader modules that pull from wiki pages.
- *
* 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
* - getDB()
* - isKnownEmpty()
* - getTitleInfo()
+ *
+ * @ingroup ResourceLoader
+ * @since 1.17
*/
class ResourceLoaderWikiModule extends ResourceLoaderModule {