choosers = $choosers; } /** * @param string $type * @return DeferredShippingMethodChooserInterface * @since 100.2.0 */ public function get($type) : DeferredShippingMethodChooserInterface { if (!isset($this->choosers[$type])) { throw new \InvalidArgumentException(sprintf( 'Deferred shipping method %s is not registered.', $type )); } return $this->choosers[$type]; } }