MediaWiki  master
IContentHandlerFactory.php
Go to the documentation of this file.
1 <?php
2 
3 namespace MediaWiki\Content;
4 
6 use FatalError;
7 use MWException;
9 
11 
21  public function getContentHandler( string $modelID ): ContentHandler;
22 
32  public function getContentModels(): array;
33 
40  public function getAllContentFormats(): array;
41 
49  public function isDefinedModel( string $modelID ): bool;
50 }
ContentHandler
A content handler knows how do deal with a specific type of content on a wiki page.
Definition: ContentHandler.php:57
MediaWiki\Content
Definition: ContentHandlerFactory.php:25
MediaWiki\Content\IContentHandlerFactory\getContentModels
getContentModels()
Returns a list of defined content models.
MediaWiki\Content\IContentHandlerFactory\getAllContentFormats
getAllContentFormats()
Returns a list of all serialization formats supported for any of the defined content models.
MWException
MediaWiki exception.
Definition: MWException.php:26
MediaWiki\Content\IContentHandlerFactory\isDefinedModel
isDefinedModel(string $modelID)
Returns true if $modelID is a defined content model for which getContentHandler() can be expected to ...
MediaWiki\Content\IContentHandlerFactory
Definition: IContentHandlerFactory.php:10
MediaWiki\Content\IContentHandlerFactory\getContentHandler
getContentHandler(string $modelID)
Returns a ContentHandler instance for the given $modelID.
FatalError
Abort the web request with a custom HTML string that will represent the entire response.
Definition: FatalError.php:35
MWUnknownContentModelException
Exception thrown when an unregistered content model is requested.
Definition: MWUnknownContentModelException.php:10