You are here

class ProfilerStorageFactory in Devel 4.x

Same name and namespace in other branches
  1. 8.3 webprofiler/src/Profiler/ProfilerStorageFactory.php \Drupal\webprofiler\Profiler\ProfilerStorageFactory
  2. 8 webprofiler/src/Profiler/ProfilerStorageFactory.php \Drupal\webprofiler\Profiler\ProfilerStorageFactory
  3. 8.2 webprofiler/src/Profiler/ProfilerStorageFactory.php \Drupal\webprofiler\Profiler\ProfilerStorageFactory

Class ProfilerStorageFactory.

Hierarchy

Expanded class hierarchy of ProfilerStorageFactory

File

webprofiler/src/Profiler/ProfilerStorageFactory.php, line 11

Namespace

Drupal\webprofiler\Profiler
View source
class ProfilerStorageFactory {

  /**
   * @param \Drupal\Core\Config\ConfigFactoryInterface $config
   * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
   *
   * @return \Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface
   */
  public static final function getProfilerStorage(ConfigFactoryInterface $config, ContainerInterface $container) {
    $storage = $config
      ->get('webprofiler.config')
      ->get('storage') ?: 'profiler.database_storage';
    return $container
      ->get($storage);
  }

}

Members