return new $class( $conf, $type, $key );
}
+ /**
+ * @return string
+ */
+ public function getKey() {
+ return $this->key;
+ }
+
/**
* I want to do this task and I need to do it myself.
*
* Do something with the error, like showing it to the user.
* @return bool
*/
- function error( $status ) {
+ public function error( $status ) {
return false;
}
* @param $status Status
* @return void
*/
- function logError( $status ) {
- wfDebugLog( 'poolcounter', "Pool key '{$this->key}':"
+ public function logError( $status ) {
+ $key = $this->poolCounter->getKey();
+
+ wfDebugLog( 'poolcounter', "Pool key '$key': "
. $status->getMessage()->inLanguage( 'en' )->useDatabase( false )->text() );
}
return false;
}
- function fallback() {
+ public function fallback() {
if ( $this->fallback ) {
return call_user_func_array( $this->fallback, array() );
}
return false;
}
- function error( $status ) {
+ public function error( $status ) {
if ( $this->error ) {
return call_user_func_array( $this->error, array( $status ) );
}