MediaWiki master
MediaWiki\Content\IContentHandlerFactory Interface Reference

Inherited by MediaWiki\Content\ContentHandlerFactory.

Public Member Functions

 getAllContentFormats ()
 Returns a list of all serialization formats supported for any of the defined content models.
 
 getContentHandler (string $modelID)
 Returns a ContentHandler instance for the given $modelID.
 
 getContentModels ()
 Returns a list of defined content models.
 
 isDefinedModel (string $modelID)
 Returns true if $modelID is a defined content model for which getContentHandler() can be expected to return a ContentHandler instance.
 

Detailed Description

Definition at line 8 of file IContentHandlerFactory.php.

Member Function Documentation

◆ getAllContentFormats()

MediaWiki\Content\IContentHandlerFactory::getAllContentFormats ( )

Returns a list of all serialization formats supported for any of the defined content models.

See also
ContentHandler::getSupportedFormats()
Returns
string[]

Implemented in MediaWiki\Content\ContentHandlerFactory.

◆ getContentHandler()

MediaWiki\Content\IContentHandlerFactory::getContentHandler ( string $modelID)

Returns a ContentHandler instance for the given $modelID.

Parameters
string$modelID
Returns
ContentHandler
Exceptions
MWUnknownContentModelExceptionIf no handler is known for the model ID.

Implemented in MediaWiki\Content\ContentHandlerFactory.

Referenced by MediaWiki\EditPage\TextConflictHelper\__construct().

◆ getContentModels()

MediaWiki\Content\IContentHandlerFactory::getContentModels ( )

Returns a list of defined content models.

getContentHandler() can be expected to return a ContentHandler for the models returned by this method.

Returns
string[]

Implemented in MediaWiki\Content\ContentHandlerFactory.

◆ isDefinedModel()

MediaWiki\Content\IContentHandlerFactory::isDefinedModel ( string $modelID)

Returns true if $modelID is a defined content model for which getContentHandler() can be expected to return a ContentHandler instance.

Parameters
string$modelID
Returns
bool

Implemented in MediaWiki\Content\ContentHandlerFactory.


The documentation for this interface was generated from the following file: