Exemplo n.º 1
0
 /**
  * Register a hook subscriber bundle.
  *
  * @param ProviderBundle $bundle HookProviderBundle.
  *
  * @return AbstractContainer
  */
 public function registerHookProviderBundle(ProviderBundle $bundle)
 {
     if (array_key_exists($bundle->getArea(), $this->providerBundles)) {
         throw new \InvalidArgumentException(sprintf('Area %s is already registered', $bundle->getArea()));
     }
     $this->providerBundles[$bundle->getArea()] = $bundle;
     return $this;
 }
Exemplo n.º 2
0
 /**
  * Unregister a provider bundle with persistence.
  *
  * @param ProviderBundle $bundle
  */
 public function unregisterProviderBundle(ProviderBundle $bundle)
 {
     $this->storage->unregisterProviderByArea($bundle->getArea());
     $this->reload();
 }