MediaWiki master
UnknownContentModelException.php
Go to the documentation of this file.
1<?php
2
3namespace MediaWiki\Content;
4
5use Exception;
6
16class UnknownContentModelException extends Exception {
21 public function __construct(
22 private readonly string $modelId,
23 ) {
24 parent::__construct( "The content model '$modelId' is not registered on this wiki.\n" .
25 'See https://www.mediawiki.org/wiki/Content_handlers to find out which extensions ' .
26 'handle this content model.' );
27 }
28
30 public function getModelId() {
31 return $this->modelId;
32 }
33}
34
36class_alias( UnknownContentModelException::class, 'MWUnknownContentModelException' );
38class_alias( UnknownContentModelException::class, 'MediaWiki\\Exception\\MWUnknownContentModelException' );
Exception thrown when an unregistered content model is requested.