X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=includes%2Fmedia%2FMediaHandler.php;h=1a96c1da4378b2f8d52dd9986e3f07b9a5e9856e;hb=9cbb8f104d66b9b1a5497e12cd931a3827f6b5b3;hp=66a429128600d84159f22d9d3a93cc75986211d0;hpb=07bb67286b87ee8fbe0325264b63d11be48de765;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/media/MediaHandler.php b/includes/media/MediaHandler.php index 66a4291286..1a96c1da43 100644 --- a/includes/media/MediaHandler.php +++ b/includes/media/MediaHandler.php @@ -87,7 +87,7 @@ abstract class MediaHandler { * @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 @@ -104,7 +104,7 @@ abstract class MediaHandler { * Warning, FSFile::getPropsFromPath might pass an FSFile instead of File (!) * @param string $path The filename * @return array|bool Follow the format of PHP getimagesize() internal function. - * See https://secure.php.net/getimagesize. MediaWiki will only ever use the + * See https://www.php.net/getimagesize. MediaWiki will only ever use the * first two array keys (the width and height), and the 'bits' associative * key. All other array keys are ignored. Returning a 'bits' key is optional * as not all formats have a notion of "bitdepth". Returns false on failure. @@ -119,7 +119,7 @@ abstract class MediaHandler { * @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 ''; } @@ -195,7 +195,7 @@ abstract class MediaHandler { * @param string $metadata The metadata in serialized form * @return bool */ - function isMetadataValid( $image, $metadata ) { + public function isMetadataValid( $image, $metadata ) { return self::METADATA_GOOD; } @@ -287,7 +287,7 @@ abstract class MediaHandler { * @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 @@ -340,7 +340,7 @@ abstract class MediaHandler { * @param File $file * @return bool */ - function pageCount( File $file ) { + public function pageCount( File $file ) { return false; } @@ -381,7 +381,7 @@ abstract class MediaHandler { * False if the handler is disabled for all files * @return bool */ - function isEnabled() { + public function isEnabled() { return true; } @@ -401,7 +401,7 @@ abstract class MediaHandler { * @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 [ @@ -477,7 +477,7 @@ abstract class MediaHandler { * @param bool|IContextSource $context Context to use (optional) * @return array|bool */ - function formatMetadata( $image, $context = false ) { + public function formatMetadata( $image, $context = false ) { return false; } @@ -582,7 +582,7 @@ abstract class MediaHandler { * @param File $file * @return string */ - function getLongDesc( $file ) { + public function getLongDesc( $file ) { return self::getGeneralLongDesc( $file ); } @@ -660,7 +660,7 @@ abstract class MediaHandler { * @param string $fileName The local path to the file. * @return Status */ - function verifyUpload( $fileName ) { + public function verifyUpload( $fileName ) { return Status::newGood(); }