class StorageFactory in XHProf 8
Provides storage factory.
Hierarchy
- class \Drupal\xhprof\StorageFactory
Expanded class hierarchy of StorageFactory
File
- src/
StorageFactory.php, line 11
Namespace
Drupal\xhprofView source
class StorageFactory {
/**
* Return the configured storage service.
*
* @param \Drupal\Core\Config\ConfigFactoryInterface $config
* The config factory.
* @param \Symfony\Component\DependencyInjection\ContainerInterface $container
* The container
*
* @return \Drupal\xhprof\XHProfLib\Storage\StorageInterface
* The storage service.
*/
public static final function getStorage(ConfigFactoryInterface $config, ContainerInterface $container) {
$storage = $config
->get('xhprof.config')
->get('storage') ?: 'xhprof.file_storage';
return $container
->get($storage);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
StorageFactory:: |
final public static | function | Return the configured storage service. |