$this->successCount += $other->successCount;
$this->failCount += $other->failCount;
}
+
+ function getErrorsArray() {
+ $result = array();
+ foreach ( $this->errors as $error ) {
+ if ( $error['type'] == 'error' )
+ $result[] = $error['message'];
+ }
+ return $result;
+ }
+
+ /**
+ * Returns true if the specified message is present as a warning or error
+ */
+ function hasMessage( $msg ) {
+ foreach ( $this->errors as $error ) {
+ if ( $error['message'] === $msg ) {
+ return true;
+ }
+ }
+ return false;
+ }
}