bootstrapContainerClass example

// Provide a default configuration, if not set.     if (!isset($configuration['default'])) {
      // @todo Use extension_loaded('apcu') for non-testbot       // https://www.drupal.org/node/2447753.       if (function_exists('apcu_fetch')) {
        $configuration['default']['cache_backend_class'] = '\Drupal\Component\FileCache\ApcuFileCacheBackend';
      }
    }
    FileCacheFactory::setConfiguration($configuration);
    FileCacheFactory::setPrefix(Settings::getApcuPrefix('file_cache', $this->root));

    $this->bootstrapContainer = new $this->bootstrapContainerClass(Settings::get('bootstrap_container_definition', $this->defaultBootstrapContainerDefinition));

    // Initialize the container.     $this->initializeContainer();

    // Add the APCu prefix to use to cache found/not-found classes.     if (Settings::get('class_loader_auto_detect', TRUE) && method_exists($this->classLoader, 'setApcuPrefix')) {
      // Vary the APCu key by which modules are installed to allow       // class_exists() checks to determine functionality.       $id = 'class_loader:' . crc32(implode(':', array_keys($this->container->getParameter('container.modules'))));
      $prefix = Settings::getApcuPrefix($id$this->root);
      $this->classLoader->setApcuPrefix($prefix);
    }
Home | Imprint | This part of the site doesn't use cookies.