$this->format = $format;
}
+ /**
+ * Return a formatter like this one but with a different format
+ *
+ * @since 1.32
+ * @param string $format New format.
+ * @return ApiErrorFormatter
+ */
+ public function newWithFormat( $format ) {
+ return new self( $this->result, $this->lang, $format, $this->useDB );
+ }
+
+ /**
+ * Fetch the format for this formatter
+ * @since 1.32
+ * @return string
+ */
+ public function getFormat() {
+ return $this->format;
+ }
+
/**
* Fetch the Language for this formatter
* @since 1.29
parent::__construct( $result, Language::factory( 'en' ), 'none', false );
}
+ public function getFormat() {
+ return 'bc';
+ }
+
public function arrayFromStatus( StatusValue $status, $type = 'error', $format = null ) {
if ( $status->isGood() || !$status->getErrors() ) {
return [];