code: public function hasExtension($extension)
      {
          if ($extension instanceof ExtensionInterface) {
              $extension = $extension->getName();
          }
  
          return $this->extensions->exists($extension);
      }
docs: @param string|object $extension
  
  @return boolean