MediaWiki REL1_37
|
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) | |
Private Member Functions | |
createContentHandlerFromHandlerSpec (string $modelID, $handlerSpec) | |
createContentHandlerFromHook (string $modelID) | |
createForModelID (string $modelID) | |
Create ContentHandler for ModelID. | |
validateContentHandler (string $modelID, $contentHandler) | |
Private Attributes | |
ContentHandler[] | $handlersByModel = [] |
Registry of ContentHandler instances by model id. | |
string[] callable[] | $handlerSpecs |
HookRunner | $hookRunner |
LoggerInterface | $logger |
ObjectFactory | $objectFactory |
Definition at line 44 of file ContentHandlerFactory.php.
MediaWiki\Content\ContentHandlerFactory::__construct | ( | array | $handlerSpecs, |
ObjectFactory | $objectFactory, | ||
HookContainer | $hookContainer, | ||
LoggerInterface | $logger | ||
) |
string[] | callable[] | $handlerSpecs | An 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.
References MediaWiki\Content\ContentHandlerFactory\$handlerSpecs, MediaWiki\Content\ContentHandlerFactory\$logger, and MediaWiki\Content\ContentHandlerFactory\$objectFactory.
|
private |
string | $modelID | |
callable | string | $handlerSpec |
MWException | |
MWUnknownContentModelException |
Definition at line 228 of file ContentHandlerFactory.php.
|
private |
string | $modelID |
MWException | |
MWUnknownContentModelException |
Definition at line 269 of file ContentHandlerFactory.php.
|
private |
Create ContentHandler for ModelID.
string | $modelID | The ID of the content model for which to get a handler. Use CONTENT_MODEL_XXX constants. |
MWUnknownContentModelException | If no handler is known for the model ID. |
MWException | For internal errors and problems in the configuration. |
Definition at line 185 of file ContentHandlerFactory.php.
Referenced by MediaWiki\Content\ContentHandlerFactory\getContentHandler().
MediaWiki\Content\ContentHandlerFactory::defineContentHandler | ( | string | $modelID, |
$handlerSpec | |||
) |
Define HandlerSpec for ModelID.
string | $modelID | |
callable | string | $handlerSpec |
MWException |
Definition at line 117 of file ContentHandlerFactory.php.
MediaWiki\Content\ContentHandlerFactory::getAllContentFormats | ( | ) |
MWException |
Implements MediaWiki\Content\IContentHandlerFactory.
Definition at line 153 of file ContentHandlerFactory.php.
MediaWiki\Content\ContentHandlerFactory::getContentHandler | ( | string | $modelID | ) |
string | $modelID |
MWException | For internal errors and problems in the configuration. |
MWUnknownContentModelException | If no handler is known for the model ID. |
Implements MediaWiki\Content\IContentHandlerFactory.
Definition at line 95 of file ContentHandlerFactory.php.
References MediaWiki\Content\ContentHandlerFactory\createForModelID().
MediaWiki\Content\ContentHandlerFactory::getContentModels | ( | ) |
Get defined ModelIDs.
MWException | |
FatalError |
Implements MediaWiki\Content\IContentHandlerFactory.
Definition at line 134 of file ContentHandlerFactory.php.
MediaWiki\Content\ContentHandlerFactory::isDefinedModel | ( | string | $modelID | ) |
string | $modelID |
MWException |
Implements MediaWiki\Content\IContentHandlerFactory.
Definition at line 170 of file ContentHandlerFactory.php.
|
private |
string | $modelID | |
ContentHandler | $contentHandler |
MWException | |
MWUnknownContentModelException |
Definition at line 201 of file ContentHandlerFactory.php.
|
private |
Registry of ContentHandler instances by model id.
Definition at line 54 of file ContentHandlerFactory.php.
|
private |
Definition at line 49 of file ContentHandlerFactory.php.
Referenced by MediaWiki\Content\ContentHandlerFactory\__construct().
|
private |
Definition at line 60 of file ContentHandlerFactory.php.
|
private |
Definition at line 63 of file ContentHandlerFactory.php.
Referenced by MediaWiki\Content\ContentHandlerFactory\__construct().
|
private |
Definition at line 57 of file ContentHandlerFactory.php.
Referenced by MediaWiki\Content\ContentHandlerFactory\__construct().