$name = $callbacks[$name]; } } if ( !isset( $this->doWork ) ) { throw new MWException( "No callback provided for 'doWork' function." ); } $this->cacheable = isset( $this->doCachedWork ); } public function doWork() { return call_user_func_array( $this->doWork, array() ); } public function getCachedWork() { if ( $this->doCachedWork ) { return call_user_func_array( $this->doCachedWork, array() ); } return false; } public function fallback() { if ( $this->fallback ) { return call_user_func_array( $this->fallback, array() ); } return false; } public function error( $status ) { if ( $this->error ) { return call_user_func_array( $this->error, array( $status ) ); } return false; } }