MediaWiki REL1_34
DBExpectedError.php
Go to the documentation of this file.
1<?php
21namespace Wikimedia\Rdbms;
22
24
32class DBExpectedError extends DBError implements MessageSpecifier {
34 protected $params;
35
42 public function __construct(
43 IDatabase $db = null, $error, array $params = [], $prev = null
44 ) {
45 parent::__construct( $db, $error, $prev );
46 $this->params = $params;
47 }
48
49 public function getKey() {
50 return 'databaseerror-text';
51 }
52
53 public function getParams() {
54 return $this->params;
55 }
56}
57
61class_alias( DBExpectedError::class, 'DBExpectedError' );
Database error base class.
Definition DBError.php:30
IDatabase null $db
Definition DBError.php:32
Base class for the more common types of database errors.
string[] $params
Message parameters.
getParams()
Returns the message parameters.
__construct(IDatabase $db=null, $error, array $params=[], $prev=null)
getKey()
Returns the message key.
Basic database interface for live and lazy-loaded relation database handles.
Definition IDatabase.php:38