private function getProvider($subjectOrOrderItem)
    {
        foreach ($this->registry->getProviders() as $provider) {
            if ($provider->supports($subjectOrOrderItem)) {
                return $provider;
            }
        }

        throw new InvalidArgumentException('Unsupported subject.');
    }
private function getProvider($subjectOrOrderItem)
    {
        foreach ($this->registry->getProviders() as $provider) {
            if ($provider->supports($subjectOrOrderItem)) {
                return $provider;
            }
        }

        throw new InvalidArgumentException('Unsupported subject.');
    }
private function getProvider ( $ subjectOrOrderItem ) { foreach ( $ this -> registry -> getProviders ( ) as $ provider ) { if ( $ provider -> supports ( $ subjectOrOrderItem ) ) { return $ provider ; } } throw new InvalidArgumentException ( 'Unsupported subject.' ) ; }
Returns the provider supporting the subject or item.

@param $subjectOrOrderItem
@return \Ekyna\Bundle\OrderBundle\Provider\ItemProviderInterface
@throws InvalidArgumentException
Returns the provider supporting the subject or item .