src/bundles/UI/Alert.php
private static function prepare( $type, $message )
	{
		// to avoid typos and other mistakes we 
		// validate the alert type
		$type = strtolower( $type );
		if ( !in_array( $type, static::$_types ) ) 
		{
			throw new Exception( "UI\Alert - Unknown alert type '{$type}'!" );
		}

		// We always need to return an array
		if ( !is_array( $message ) )
		{
			return array( $message );
		}
		return $message;
	}
private static function prepare( $type, $message )
	{
		// to avoid typos and other mistakes we 
		// validate the alert type
		$type = strtolower( $type );
		if ( !in_array( $type, static::$_types ) ) 
		{
			throw new Exception( "UI\Alert - Unknown alert type '{$type}'!" );
		}

		// We always need to return an array
		if ( !is_array( $message ) )
		{
			return array( $message );
		}
		return $message;
	}
private static function prepare ( $ type , $ message ) { // to avoid typos and other mistakes we  // validate the alert type $ type = strtolower ( $ type ) ; if ( ! in_array ( $ type , static :: $ _types ) ) { throw new Exception ( "UI\Alert - Unknown alert type '{$type}'!" ) ; } // We always need to return an array if ( ! is_array ( $ message ) ) { return array ( $ message ) ; } return $ message ; }
Validate the alert type and format the message

@param string 			$type
@param string|array 		$message
@return array
Validate the alert type and format the message