Merge "Selenium: replace UserLoginPage with BlankPage where possible"
[lhc/web/wiklou.git] / includes / Rest / PathTemplateMatcher / PathConflict.php
1 <?php
2
3 namespace MediaWiki\Rest\PathTemplateMatcher;
4
5 use Exception;
6
7 class PathConflict extends Exception {
8 public $newTemplate;
9 public $newUserData;
10 public $existingTemplate;
11 public $existingUserData;
12
13 public function __construct( $template, $userData, $existingNode ) {
14 $this->newTemplate = $template;
15 $this->newUserData = $userData;
16 $this->existingTemplate = $existingNode['template'];
17 $this->existingUserData = $existingNode['userData'];
18 parent::__construct( "Unable to add path template \"$template\" since it conflicts " .
19 "with the existing template \"{$this->existingTemplate}\"" );
20 }
21 }