26use InvalidArgumentException;
40 public const PASS =
'PASS';
43 public const FAIL =
'FAIL';
56 public const UI =
'UI';
161 $ret->message = $msg;
162 $ret->messageType =
'error';
175 $ret->message = $msg;
196 public static function newUI( array $reqs,
Message $msg, $msgtype =
'warning' ) {
198 throw new InvalidArgumentException(
'$reqs may not be empty' );
200 if ( $msgtype !==
'warning' && $msgtype !==
'error' ) {
201 throw new InvalidArgumentException( $msgtype .
' is not a valid message type.' );
206 $ret->neededRequests = $reqs;
207 $ret->message = $msg;
208 $ret->messageType = $msgtype;
221 throw new InvalidArgumentException(
'$reqs may not be empty' );
226 $ret->neededRequests = $reqs;