Field::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
rs 9.4286
cc 1
eloc 5
nc 1
nop 4
1
<?php
2
3
namespace Saxulum\Crud\Listing;
4
5
class Field
6
{
7
    /**
8
     * @var string
9
     */
10
    protected $name;
11
12
    /**
13
     * @var string
14
     */
15
    protected $type;
16
17
    /**
18
     * @var string
19
     */
20
    protected $template;
21
22
    /**
23
     * @var array
24
     */
25
    protected $options;
26
27
    /**
28
     * @param string $name
29
     * @param string $type
30
     * @param string $template
31
     * @param array  $options
32
     */
33
    public function __construct($name, $type, $template, array $options)
34
    {
35
        $this->name = $name;
36
        $this->type = $type;
37
        $this->template = $template;
38
        $this->options = $options;
39
    }
40
41
    /**
42
     * @return string
43
     */
44
    public function getName()
45
    {
46
        return $this->name;
47
    }
48
49
    /**
50
     * @return string
51
     */
52
    public function getType()
53
    {
54
        return $this->type;
55
    }
56
57
    /**
58
     * @return string
59
     */
60
    public function getTemplate()
61
    {
62
        return $this->template;
63
    }
64
65
    /**
66
     * @return array
67
     */
68
    public function getOptions()
69
    {
70
        return $this->options;
71
    }
72
}
73