src/Checkout/CheckoutComponentConfig.php
public function getComponentByType($type)
    {
        foreach ($this->components as $component) {
            if ($this->namespaced) {
                if ($component->Proxy() instanceof $type) {
                    return $component->Proxy();
                }
            } else {
                if ($component instanceof $type) {
                    return $component;
                }
            }
        }
    }
public function getComponentByType($type)
    {
        foreach ($this->components as $component) {
            if ($this->namespaced) {
                if ($component->Proxy() instanceof $type) {
                    return $component->Proxy();
                }
            } else {
                if ($component instanceof $type) {
                    return $component;
                }
            }
        }
    }
Returns the first available component with the given class or interface.

@param String ClassName

@return CheckoutComponent