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