Exemple #1
0
 /**
  * @param string|object $extension
  *
  * @return boolean
  */
 public function hasExtension($extension)
 {
     if ($extension instanceof ExtensionInterface) {
         $extension = $extension->getName();
     }
     return $this->extensions->exists($extension);
 }
Exemple #2
0
 /**
  * Adds a factory extension.
  *
  * @param ExtensionInterface $extension
  * @param int                $priority
  */
 public function addExtension(ExtensionInterface $extension, $priority = 0)
 {
     $this->extensions->insert($extension, $priority);
 }