Completed
Push — 8.7 ( b6d8c1...3ac046 )
by Markus
06:49
created

ProviderContainer   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 6
c 1
b 0
f 0
dl 0
loc 25
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getSessionInfoProvider() 0 3 1
A getAttributeValueProvider() 0 3 1
A getNameIdProvider() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace DMK\MKSamlAuth\Container;
6
7
use LightSaml\Build\Container\ProviderContainerInterface;
8
use LightSaml\Provider\Attribute\FixedAttributeValueProvider;
9
use LightSaml\Provider\NameID\FixedNameIdProvider;
10
use LightSaml\Provider\Session\FixedSessionInfoProvider;
11
use TYPO3\CMS\Core\SingletonInterface;
12
use TYPO3\CMS\Extbase\Object\Container\Container;
13
14
class ProviderContainer implements ProviderContainerInterface, SingletonInterface
15
{
16
    /**
17
     * @var SingletonContainer
18
     */
19
    private $container;
20
21
    public function __construct(SingletonContainer $container)
22
    {
23
        $this->container = $container;
24
    }
25
26
    public function getAttributeValueProvider()
27
    {
28
        return $this->container->getInstance(FixedAttributeValueProvider::class);
29
    }
30
31
    public function getSessionInfoProvider()
32
    {
33
        return $this->container->getInstance(FixedSessionInfoProvider::class);
34
    }
35
36
    public function getNameIdProvider()
37
    {
38
        return $this->container->getInstance(FixedNameIdProvider::class);
39
    }
40
}
41