* @param File $image
* @param array &$params
*/
- abstract function normaliseParams( $image, &$params );
+ abstract public function normaliseParams( $image, &$params );
/**
* Get an image size array like that returned by getimagesize(), or false if it
* @param string $path The filename
* @return string A string of metadata in php serialized form (Run through serialize())
*/
- function getMetadata( $image, $path ) {
+ public function getMetadata( $image, $path ) {
return '';
}
* @param string $metadata The metadata in serialized form
* @return bool
*/
- function isMetadataValid( $image, $metadata ) {
+ public function isMetadataValid( $image, $metadata ) {
return self::METADATA_GOOD;
}
* @param array|null $params Handler specific rendering parameters
* @return array Thumbnail extension and MIME type
*/
- function getThumbType( $ext, $mime, $params = null ) {
+ public function getThumbType( $ext, $mime, $params = null ) {
$magic = MediaWiki\MediaWikiServices::getInstance()->getMimeAnalyzer();
if ( !$ext || $magic->isMatchingExtension( $ext, $mime ) === false ) {
// The extension is not valid for this MIME type and we do
* @param File $file
* @return bool
*/
- function pageCount( File $file ) {
+ public function pageCount( File $file ) {
return false;
}
* False if the handler is disabled for all files
* @return bool
*/
- function isEnabled() {
+ public function isEnabled() {
return true;
}
* @param int $page What page to get dimensions of
* @return array|bool
*/
- function getPageDimensions( File $image, $page ) {
+ public function getPageDimensions( File $image, $page ) {
$gis = $this->getImageSize( $image, $image->getLocalRefPath() );
if ( $gis ) {
return [
* @param bool|IContextSource $context Context to use (optional)
* @return array|bool
*/
- function formatMetadata( $image, $context = false ) {
+ public function formatMetadata( $image, $context = false ) {
return false;
}
* @param File $file
* @return string
*/
- function getLongDesc( $file ) {
+ public function getLongDesc( $file ) {
return self::getGeneralLongDesc( $file );
}
* @param string $fileName The local path to the file.
* @return Status
*/
- function verifyUpload( $fileName ) {
+ public function verifyUpload( $fileName ) {
return Status::newGood();
}
/**
* Converts a dimensions array about a potentially multipage document from an
* exhaustive list of ordered page numbers to a list of page ranges
- * @param Array $pagesByDimensions
- * @return String
+ * @param array $pagesByDimensions
+ * @return string
* @since 1.30
*/
public static function getPageRangesByDimensions( $pagesByDimensions ) {