@@ 253-261 (lines=9) @@ | ||
250 | * @param GatewayDataFormatterInterface $gateway_data_formatter |
|
251 | * @throws InvalidEntityException if it's not set properly |
|
252 | */ |
|
253 | public function set_gateway_data_formatter(GatewayDataFormatterInterface $gateway_data_formatter) |
|
254 | { |
|
255 | if (! $gateway_data_formatter instanceof GatewayDataFormatterInterface) { |
|
256 | throw new InvalidEntityException( |
|
257 | is_object($gateway_data_formatter) |
|
258 | ? get_class($gateway_data_formatter) |
|
259 | : esc_html__('Not an object', 'event_espresso'), |
|
260 | '\\EventEspresso\\core\\services\\payment_methods\\gateways\\GatewayDataFormatterInterface' |
|
261 | ); |
|
262 | } |
|
263 | $this->_gateway_data_formatter = $gateway_data_formatter; |
|
264 | } |
|
@@ 293-301 (lines=9) @@ | ||
290 | * @return FormatterInterface |
|
291 | * @throws InvalidEntityException |
|
292 | */ |
|
293 | public function set_unsupported_character_remover(FormatterInterface $formatter) |
|
294 | { |
|
295 | if (! $formatter instanceof FormatterInterface) { |
|
296 | throw new InvalidEntityException( |
|
297 | is_object($formatter) |
|
298 | ? get_class($formatter) |
|
299 | : esc_html__('Not an object', 'event_espresso'), |
|
300 | '\\EventEspresso\\core\\services\\formatters\\FormatterInterface' |
|
301 | ); |
|
302 | } |
|
303 | $this->_unsupported_character_remover = $formatter; |
|
304 | } |