-
Notifications
You must be signed in to change notification settings - Fork 0
/
TierPropertyValidator.php
192 lines (159 loc) · 3.62 KB
/
TierPropertyValidator.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<?php
namespace Vayes\Tier;
use Vayes\Tier\Helper\TimestampableTrait;
use Vayes\Tier\Helper\BlameableTrait;
use Vayes\Tier\Helper\SoftDeleteableTrait;
class TierPropertyValidator
{
use TimestampableTrait, BlameableTrait, SoftDeleteableTrait;
/** @var string */
private $id;
/** @var string */
private $tier_property_id;
/** @var string */
private $validator_id;
/** @var string|null */
private $message;
/** @var string|null */
private $argument_1;
/** @var string|null */
private $argument_2;
/** @var bool */
private $on_insert = true;
/** @var bool */
private $on_update = true;
/** @var bool */
private $on_delete = true;
/** @var ValidationRule */
protected $validator;
public function getId(): ?string
{
return $this->id;
}
/**
* @param string $id
* @return $this
*/
public function setId(string $id): self
{
$this->id = $id;
return $this;
}
public function getTierPropertyId(): ?string
{
return $this->tier_property_id;
}
/**
* @param string $tier_property_id
* @return $this
*/
public function setTierPropertyId(string $tier_property_id): self
{
$this->tier_property_id = $tier_property_id;
return $this;
}
public function getValidatorId(): ?string
{
return $this->validator_id;
}
/**
* @param string $validator_id
* @return $this
*/
public function setValidatorId(string $validator_id): self
{
$this->validator_id = $validator_id;
return $this;
}
public function getMessage(): ?string
{
return $this->message;
}
/**
* @param string|null $message
* @return $this
*/
public function setMessage(?string $message): self
{
$this->message = $message;
return $this;
}
public function getArgument1(): ?string
{
return $this->argument_1;
}
/**
* @param string|null $argument_1
* @return $this
*/
public function setArgument1(?string $argument_1): self
{
$this->argument_1 = $argument_1;
return $this;
}
public function getArgument2(): ?string
{
return $this->argument_2;
}
/**
* @param string|null $argument_2
* @return $this
*/
public function setArgument2(?string $argument_2): self
{
$this->argument_2 = $argument_2;
return $this;
}
public function isOnInsert(): bool
{
return $this->on_insert;
}
/**
* @param bool $on_insert
* @return $this
*/
public function setOnInsert(bool $on_insert): self
{
$this->on_insert = $on_insert;
return $this;
}
public function isOnUpdate(): bool
{
return $this->on_update;
}
/**
* @param bool $on_update
* @return $this
*/
public function setOnUpdate(bool $on_update): self
{
$this->on_update = $on_update;
return $this;
}
public function isOnDelete(): bool
{
return $this->on_delete;
}
/**
* @param bool $on_delete
* @return $this
*/
public function setOnDelete(bool $on_delete): self
{
$this->on_delete = $on_delete;
return $this;
}
public function getValidator(): ValidationRule
{
return $this->validator;
}
/**
* @param ValidationRule $validator
* @return $this
*/
public function setValidator(ValidationRule $validator): self
{
$this->validator = $validator;
return $this;
}
}