X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fcontent%2FContentHandler.php;h=0509e292150525e9341f8541bc9196380c433405;hp=f85b00d8ed681dd00698048cf9fbd0e084f22009;hb=2480aae0c97d822e10b50619e7b48b25c45af073;hpb=8e185ecb2b53217665ea53f63119a28b3f80ff56 diff --git a/includes/content/ContentHandler.php b/includes/content/ContentHandler.php index f85b00d8ed..0509e29215 100644 --- a/includes/content/ContentHandler.php +++ b/includes/content/ContentHandler.php @@ -136,7 +136,7 @@ abstract class ContentHandler { $modelId = $title->getContentModel(); } - $handler = ContentHandler::getForModelID( $modelId ); + $handler = self::getForModelID( $modelId ); return $handler->unserializeContent( $text, $format ); } @@ -240,7 +240,7 @@ abstract class ContentHandler { public static function getForTitle( Title $title ) { $modelId = $title->getContentModel(); - return ContentHandler::getForModelID( $modelId ); + return self::getForModelID( $modelId ); } /** @@ -256,7 +256,7 @@ abstract class ContentHandler { public static function getForContent( Content $content ) { $modelId = $content->getModel(); - return ContentHandler::getForModelID( $modelId ); + return self::getForModelID( $modelId ); } /** @@ -293,8 +293,8 @@ abstract class ContentHandler { public static function getForModelID( $modelId ) { global $wgContentHandlers; - if ( isset( ContentHandler::$handlers[$modelId] ) ) { - return ContentHandler::$handlers[$modelId]; + if ( isset( self::$handlers[$modelId] ) ) { + return self::$handlers[$modelId]; } if ( empty( $wgContentHandlers[$modelId] ) ) { @@ -327,9 +327,9 @@ abstract class ContentHandler { wfDebugLog( 'ContentHandler', 'Created handler for ' . $modelId . ': ' . get_class( $handler ) ); - ContentHandler::$handlers[$modelId] = $handler; + self::$handlers[$modelId] = $handler; - return ContentHandler::$handlers[$modelId]; + return self::$handlers[$modelId]; } /** @@ -372,7 +372,7 @@ abstract class ContentHandler { $formats = []; foreach ( $wgContentHandlers as $model => $class ) { - $handler = ContentHandler::getForModelID( $model ); + $handler = self::getForModelID( $model ); $formats = array_merge( $formats, $handler->getSupportedFormats() ); } @@ -1134,10 +1134,10 @@ abstract class ContentHandler { /** * Add new field definition to array. - * @param SearchIndexField[] $fields - * @param SearchEngine $engine - * @param string $name - * @param int $type + * @param SearchIndexField[] &$fields + * @param SearchEngine $engine + * @param string $name + * @param int $type * @return SearchIndexField[] new field defs * @since 1.28 */ @@ -1151,7 +1151,7 @@ abstract class ContentHandler { * as representation of this document. * Overriding class should call parent function or take care of calling * the SearchDataForIndex hook. - * @param WikiPage $page Page to index + * @param WikiPage $page Page to index * @param ParserOutput $output * @param SearchEngine $engine Search engine for which we are indexing * @return array Map of name=>value for fields @@ -1190,7 +1190,7 @@ abstract class ContentHandler { * * Specific content handlers may override it if they need different content handling. * - * @param WikiPage $page + * @param WikiPage $page * @param ParserCache $cache * @return ParserOutput */