return 'local';
}
- /**
- * From where in the page HTML should this module be loaded?
- *
- * @deprecated since 1.29 Obsolete. All modules load async from `<head>`.
- * @return string
- */
- public function getPosition() {
- return 'top';
- }
-
/**
* Whether this module's JS expects to work without the client-side ResourceLoader module.
* Returning true from this function will prevent mw.loader.state() call from being
* 'https://example.org/image.png' => [ 'as' => 'image' ],
* ];
* }
- * @encode
+ * @endcode
*
* @par Example using HiDPI image variants
* @code
* ],
* ];
* }
- * @encode
+ * @endcode
*
* @see ResourceLoaderModule::getHeaders
* @since 1.30
return null;
}
- /**
- * Back-compat dummy for old subclass implementations of getModifiedTime().
- *
- * This method used to use ObjectCache to track when a hash was first seen. That principle
- * stems from a time that ResourceLoader could only identify module versions by timestamp.
- * That is no longer the case. Use getDefinitionSummary() directly.
- *
- * @deprecated since 1.26 Superseded by getVersionHash()
- * @param ResourceLoaderContext $context
- * @return int UNIX timestamp
- */
- public function getHashMtime( ResourceLoaderContext $context ) {
- if ( !is_string( $this->getModifiedHash( $context ) ) ) {
- return 1;
- }
- // Dummy that is > 1
- return 2;
- }
-
- /**
- * Back-compat dummy for old subclass implementations of getModifiedTime().
- *
- * @since 1.23
- * @deprecated since 1.26 Superseded by getVersionHash()
- * @param ResourceLoaderContext $context
- * @return int UNIX timestamp
- */
- public function getDefinitionMtime( ResourceLoaderContext $context ) {
- if ( $this->getDefinitionSummary( $context ) === null ) {
- return 1;
- }
- // Dummy that is > 1
- return 2;
- }
-
/**
* Check whether this module is known to be empty. If a child class
* has an easy and cheap way to determine that this module is
* @return int UNIX timestamp
*/
protected static function safeFilemtime( $filePath ) {
- MediaWiki\suppressWarnings();
+ Wikimedia\suppressWarnings();
$mtime = filemtime( $filePath ) ?: 1;
- MediaWiki\restoreWarnings();
+ Wikimedia\restoreWarnings();
return $mtime;
}