Completed
Push — feature/EVO-6307-record-origin... ( 2c1fcb...797eb1 )
by Narcotic
97:17 queued 32:45
created

AbstractField::isRecordOriginException()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * AbstractField class file
4
 */
5
6
namespace Graviton\DocumentBundle\DependencyInjection\Compiler\Utils;
7
8
/**
9
 * Base document field
10
 *
11
 * @author   List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
12
 * @license  http://opensource.org/licenses/gpl-license.php GNU Public License
13
 * @link     http://swisscom.ch
14
 */
15
class AbstractField
16
{
17
    /**
18
     * @var string
19
     */
20
    private $fieldName;
21
    /**
22
     * @var string
23
     */
24
    private $exposedName;
25
    /**
26
     * @var bool
27
     */
28
    private $readOnly;
29
    /**
30
     * @var bool
31
     */
32
    private $required;
33
    /**
34
     * @var bool
35
     */
36
    private $searchable;
37
    /**
38
     * @var bool
39
     */
40
    private $recordOriginException;
41
42
    /**
43
     * Constructor
44
     *
45
     * @param string $fieldName             Field name
46
     * @param string $exposedName           Exposed name
47
     * @param bool   $readOnly              Read only
48
     * @param bool   $required              Is required
49
     * @param bool   $searchable            Is searchable
50
     * @param bool   $recordOriginException Is an exception to record origin
51
     */
52
    public function __construct($fieldName, $exposedName, $readOnly, $required, $searchable, $recordOriginException)
53
    {
54
        $this->fieldName = $fieldName;
55
        $this->exposedName = $exposedName;
56
        $this->readOnly = $readOnly;
57
        $this->required = $required;
58
        $this->searchable = $searchable;
59
        $this->recordOriginException = $recordOriginException;
60
    }
61
62
    /**
63
     * Get field name
64
     *
65
     * @return string
66
     */
67
    public function getFieldName()
68
    {
69
        return $this->fieldName;
70
    }
71
72
    /**
73
     * Get exposed name
74
     *
75
     * @return string
76
     */
77
    public function getExposedName()
78
    {
79
        return $this->exposedName;
80
    }
81
82
    /**
83
     * Is read only
84
     *
85
     * @return bool
86
     */
87
    public function isReadOnly()
88
    {
89
        return $this->readOnly;
90
    }
91
92
    /**
93
     * Is required
94
     *
95
     * @return bool
96
     */
97
    public function isRequired()
98
    {
99
        return $this->required;
100
    }
101
102
    /**
103
     * Is searchable
104
     *
105
     * @return boolean
106
     */
107
    public function isSearchable()
108
    {
109
        return $this->searchable;
110
    }
111
112
    /**
113
     * @param boolean $searchable Is searchable
114
     *
115
     * @return void
116
     */
117
    public function setSearchable($searchable)
118
    {
119
        $this->searchable = $searchable;
120
    }
121
122
    /**
123
     * get RecordOriginException
124
     *
125
     * @return boolean RecordOriginException
126
     */
127
    public function isRecordOriginException()
128
    {
129
        return $this->recordOriginException;
130
    }
131
132
    /**
133
     * set RecordOriginException
134
     *
135
     * @param boolean $recordOriginException recordOriginException
136
     *
137
     * @return void
138
     */
139
    public function setRecordOriginException($recordOriginException)
140
    {
141
        $this->recordOriginException = $recordOriginException;
142
    }
143
}
144