Also made getReadOnlyReason() protected as it has no outside
callers and is not part of IDatabase.
Change-Id: If6694a19df038af645a97f701397a536570d1b42
return $this->__call( __FUNCTION__, func_get_args() );
}
+ public function isReadOnly() {
+ return $this->__call( __FUNCTION__, func_get_args() );
+ }
+
/**
* Clean up the connection when out of scope
*/
// no-op
}
+ public function isReadOnly() {
+ return ( $this->getReadOnlyReason() !== false );
+ }
+
/**
* @return string|bool Reason this DB is read-only or false if it is not
- * @since 1.27
*/
- public function getReadOnlyReason() {
+ protected function getReadOnlyReason() {
$reason = $this->getLBInfo( 'readOnlyReason' );
return is_string( $reason ) ? $reason : false;
* restore the initial value
*/
public function setBigSelects( $value = true );
+
+ /**
+ * @return bool Whether this DB is read-only
+ * @since 1.27
+ */
+ public function isReadOnly();
}