MediaWiki REL1_35
MediaWiki\Content\IContentHandlerFactory Interface Reference
Inheritance diagram for MediaWiki\Content\IContentHandlerFactory:

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 10 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[]
Exceptions
MWException

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
MWExceptionFor internal errors and problems in the configuration.
MWUnknownContentModelExceptionIf no handler is known for the model ID.

Implemented in MediaWiki\Content\ContentHandlerFactory.

Referenced by MediaWiki\EditPage\TextConflictHelper\__construct(), and ContentModelChange\createNewContent().

◆ 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[]
Exceptions
MWException
FatalError

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: