MediaWiki  master
IContentHandlerFactory.php
Go to the documentation of this file.
1 <?php
2 
3 namespace MediaWiki\Content;
4 
6 use FatalError;
8 
10 
19  public function getContentHandler( string $modelID ): ContentHandler;
20 
29  public function getContentModels(): array;
30 
36  public function getAllContentFormats(): array;
37 
45  public function isDefinedModel( string $modelID ): bool;
46 }
A content handler knows how do deal with a specific type of content on a wiki page.
Abort the web request with a custom HTML string that will represent the entire response.
Definition: FatalError.php:37
Exception thrown when an unregistered content model is requested.
isDefinedModel(string $modelID)
Returns true if $modelID is a defined content model for which getContentHandler() can be expected to ...
getContentHandler(string $modelID)
Returns a ContentHandler instance for the given $modelID.
getContentModels()
Returns a list of defined content models.
getAllContentFormats()
Returns a list of all serialization formats supported for any of the defined content models.