protected function getProvider($nameOrRelativeOrSubject)
    {
        if (null === $provider = $this->registry->getProvider($nameOrRelativeOrSubject)) {
            throw new SubjectException('Failed to get provider.');
        }

        return $provider;
    }
protected function getProvider($nameOrRelativeOrSubject)
    {
        if (null === $provider = $this->registry->getProvider($nameOrRelativeOrSubject)) {
            throw new SubjectException('Failed to get provider.');
        }

        return $provider;
    }
Returns the provider by name or supporting the given relative or subject.

@param string|SubjectRelativeInterface|object $nameOrRelativeOrSubject

@return \Ekyna\Component\Commerce\Subject\Provider\SubjectProviderInterface
@throws SubjectException