ShibbolethExtension::getGlobals()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Kuleuven\AuthenticationBundle\Twig;
4
5
use Kuleuven\AuthenticationBundle\Service\ShibbolethServiceProvider;
6
7
class ShibbolethExtension extends \Twig_Extension implements \Twig_Extension_GlobalsInterface
8
{
9
    /**
10
     * @var ShibbolethServiceProvider
11
     */
12
    protected $shibbolethServiceProvider;
13
14
    /**
15
     * @var array
16
     */
17
    protected $impersonateUsers;
18
19
    /**
20
     * @param ShibbolethServiceProvider $shibbolethServiceProvider
21
     */
22
    public function __construct(ShibbolethServiceProvider $shibbolethServiceProvider)
23
    {
24
        $this->shibbolethServiceProvider = $shibbolethServiceProvider;
25
    }
26
27
    /**
28
     * @return string
29
     */
30
    public function getName()
31
    {
32
        return 'kuleuven_authentication';
33
    }
34
35
    /**
36
     * @return array
37
     */
38
    public function getGlobals()
39
    {
40
        return ['kuleuven_shibboleth' => $this->shibbolethServiceProvider];
41
    }
42
}
43