@@ 214-225 (lines=12) @@ | ||
211 | * @return \EE_messenger |
|
212 | * @throws \EE_Error |
|
213 | */ |
|
214 | public function valid_messenger( $messenger_name ) { |
|
215 | $messenger = $this->get_messenger( $messenger_name ); |
|
216 | if ( $messenger instanceof EE_messenger ) { |
|
217 | return $messenger; |
|
218 | } |
|
219 | throw new EE_Error( |
|
220 | sprintf( |
|
221 | __( 'The "%1$s" messenger is either invalid or not installed', 'event_espresso' ), |
|
222 | $messenger_name |
|
223 | ) |
|
224 | ); |
|
225 | } |
|
226 | ||
227 | ||
228 | ||
@@ 425-436 (lines=12) @@ | ||
422 | * @return \EE_message_type |
|
423 | * @throws \EE_Error |
|
424 | */ |
|
425 | public function valid_message_type( $message_type_name ) { |
|
426 | $message_type = $this->get_message_type( $message_type_name ); |
|
427 | if ( $message_type instanceof EE_message_type ) { |
|
428 | return $message_type; |
|
429 | } |
|
430 | throw new EE_Error( |
|
431 | sprintf( |
|
432 | __( 'The "%1$s" message type is either invalid or not installed', 'event_espresso' ), |
|
433 | $message_type_name |
|
434 | ) |
|
435 | ); |
|
436 | } |
|
437 | ||
438 | ||
439 |