forked from BedrockStreaming/StatsdTagsPrometheusBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
M6WebStatsdPrometheusBundle.php
34 lines (29 loc) · 990 Bytes
/
M6WebStatsdPrometheusBundle.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
namespace M6Web\Bundle\StatsdPrometheusBundle;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class M6WebStatsdPrometheusBundle extends Bundle
{
/**
* Returns the bundle's container extension.
*
* With our `M6Web` namespace, symfony's `Container::underscore()` gives aliases starting with `m6_web`
* but we always used `m6web`, thus the consistency check here is removed.
*
* @return ExtensionInterface|null The container extension
*/
public function getContainerExtension(): ?ExtensionInterface
{
if (null === $this->extension) {
$extension = $this->createContainerExtension();
if (null !== $extension) {
$this->extension = $extension;
} else {
$this->extension = false;
}
}
if ($this->extension) {
return $this->extension;
}
}
}