MediaWiki REL1_40
MediaWiki\Content\ContentHandlerFactory Class Reference

Inherits MediaWiki\Content\IContentHandlerFactory.

Collaboration diagram for MediaWiki\Content\ContentHandlerFactory:

Public Member Functions

 __construct (array $handlerSpecs, ObjectFactory $objectFactory, HookContainer $hookContainer, LoggerInterface $logger)
 
 defineContentHandler (string $modelID, $handlerSpec)
 Define HandlerSpec for ModelID.
 
 getAllContentFormats ()
 
 getContentHandler (string $modelID)
 
 getContentModels ()
 Get defined ModelIDs.
 
 isDefinedModel (string $modelID)
 

Detailed Description

Definition at line 44 of file ContentHandlerFactory.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Content\ContentHandlerFactory::__construct ( array $handlerSpecs,
ObjectFactory $objectFactory,
HookContainer $hookContainer,
LoggerInterface $logger )
Since
1.35
Access: internal
Use
See also
MediaWikiServices::getContentHandlerFactory
Parameters
string[] | callable[]$handlerSpecsAn associative array mapping each known content model to the ObjectFactory spec used to construct its ContentHandler. This array typically comes from $wgContentHandlers.
ObjectFactory$objectFactory
HookContainer$hookContainer
LoggerInterface$logger

Definition at line 76 of file ContentHandlerFactory.php.

Member Function Documentation

◆ defineContentHandler()

MediaWiki\Content\ContentHandlerFactory::defineContentHandler ( string $modelID,
$handlerSpec )

Define HandlerSpec for ModelID.

Parameters
string$modelID
callable | string$handlerSpec
Exceptions
MWException
Access: internal

Definition at line 117 of file ContentHandlerFactory.php.

◆ getAllContentFormats()

MediaWiki\Content\ContentHandlerFactory::getAllContentFormats ( )
Returns
string[]
Exceptions
MWException

Implements MediaWiki\Content\IContentHandlerFactory.

Definition at line 153 of file ContentHandlerFactory.php.

◆ getContentHandler()

MediaWiki\Content\ContentHandlerFactory::getContentHandler ( string $modelID)
Parameters
string$modelID
Returns
ContentHandler
Exceptions
MWExceptionFor internal errors and problems in the configuration.
MWUnknownContentModelExceptionIf no handler is known for the model ID.

Implements MediaWiki\Content\IContentHandlerFactory.

Definition at line 95 of file ContentHandlerFactory.php.

◆ getContentModels()

MediaWiki\Content\ContentHandlerFactory::getContentModels ( )

Get defined ModelIDs.

Returns
string[]
Exceptions
MWException
FatalError

Implements MediaWiki\Content\IContentHandlerFactory.

Definition at line 134 of file ContentHandlerFactory.php.

◆ isDefinedModel()

MediaWiki\Content\ContentHandlerFactory::isDefinedModel ( string $modelID)
Parameters
string$modelID
Returns
bool
Exceptions
MWException

Implements MediaWiki\Content\IContentHandlerFactory.

Definition at line 170 of file ContentHandlerFactory.php.


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