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