private function getProvider($providerServiceKey)
    {
        try {
            $provider = $this->getContainer()->get($providerServiceKey);
        } catch (ServiceNotFoundException $e) {
            throw new \InvalidArgumentException(sprintf('Provider "%s" should be defined as a service.', $providerServiceKey), $e->getCode(), $e);
        }
        if (!$provider instanceof ProviderInterface) {
            throw new \InvalidArgumentException(sprintf('Provider "%s" should implement Mailjet\MailjetBundle\Provider\ProviderInterface.', $providerServiceKey));
        }
        return $provider;
    }
private function getProvider($providerServiceKey)
    {
        try {
            $provider = $this->getContainer()->get($providerServiceKey);
        } catch (ServiceNotFoundException $e) {
            throw new \InvalidArgumentException(sprintf('Provider "%s" should be defined as a service.', $providerServiceKey), $e->getCode(), $e);
        }
        if (!$provider instanceof ProviderInterface) {
            throw new \InvalidArgumentException(sprintf('Provider "%s" should implement Mailjet\MailjetBundle\Provider\ProviderInterface.', $providerServiceKey));
        }
        return $provider;
    }
private function getProvider ( $ providerServiceKey ) { try { $ provider = $ this -> getContainer ( ) -> get ( $ providerServiceKey ) ; } catch ( ServiceNotFoundException $ e ) { throw new \ InvalidArgumentException ( sprintf ( 'Provider "%s" should be defined as a service.' , $ providerServiceKey ) , $ e -> getCode ( ) , $ e ) ; } if ( ! $ provider instanceof ProviderInterface ) { throw new \ InvalidArgumentException ( sprintf ( 'Provider "%s" should implement Mailjet\MailjetBundle\Provider\ProviderInterface.' , $ providerServiceKey ) ) ; } return $ provider ; }
Get contact provider
@param string $providerServiceKey
@return ProviderInterface $provider
Get contact provider