Completed
Push — refonte ( 994918...f7c861 )
by Arnaud
02:21
created

AdminResource::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
namespace LAG\AdminBundle\Resource;
4
5
class AdminResource
6
{
7
    /**
8
     * @var string
9
     */
10
    protected $name;
11
12
    /**
13
     * @var array
14
     */
15
    protected $configuration;
16
17
    /**
18
     * @var string
19
     */
20
    protected $entityClass;
21
22
    /**
23
     * Resource constructor.
24
     *
25
     * @param string $name
26
     * @param array  $configuration
27
     */
28
    public function __construct(string $name, array $configuration)
29
    {
30
        $this->name = $name;
31
        $this->configuration = $configuration;
32
        $this->entityClass = $configuration['entity'];
33
    }
34
35
    /**
36
     * @return string
37
     */
38
    public function getName(): string
39
    {
40
        return $this->name;
41
    }
42
43
    /**
44
     * @return array
45
     */
46
    public function getConfiguration(): array
47
    {
48
        return $this->configuration;
49
    }
50
51
    /**
52
     * @return string
53
     */
54
    public function getEntityClass() : string
55
    {
56
        return $this->entityClass;
57
    }
58
}
59