public function getProvider(LifecycleEventArgs $args)
    {
        $provider = $args->getObject()->getProvider();

        if (!$provider) {
            throw new \Exception('Please set a provider on the entity before persisting any media');
        }

        return $this->container->get('opifer.media.provider.pool')->getProvider($provider);
    }
public function getProvider(LifecycleEventArgs $args)
    {
        $provider = $args->getObject()->getProvider();

        if (!$provider) {
            throw new \Exception('Please set a provider on the entity before persisting any media');
        }

        return $this->container->get('opifer.media.provider.pool')->getProvider($provider);
    }
public function getProvider ( LifecycleEventArgs $ args ) { $ provider = $ args -> getObject ( ) -> getProvider ( ) ; if ( ! $ provider ) { throw new \ Exception ( 'Please set a provider on the entity before persisting any media' ) ; } return $ this -> container -> get ( 'opifer.media.provider.pool' ) -> getProvider ( $ provider ) ; }
Get the provider pool.

@return \Opifer\MediaBundle\Provider\ProviderInterface
Get the provider pool .