Newer
Older
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
<?php
namespace Symfony\Config\Doctrine\Orm\EntityManagerConfig;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help creating config.
*/
class MappingConfig
{
private $mapping;
private $type;
private $dir;
private $alias;
private $prefix;
private $isBundle;
/**
* @default true
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function mapping($value): self
{
$this->mapping = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function type($value): self
{
$this->type = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function dir($value): self
{
$this->dir = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function alias($value): self
{
$this->alias = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function prefix($value): self
{
$this->prefix = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|bool $value
* @return $this
*/
public function isBundle($value): self
{
$this->isBundle = $value;
return $this;
}
public function __construct(array $value = [])
{
if (isset($value['mapping'])) {
$this->mapping = $value['mapping'];
unset($value['mapping']);
}
if (isset($value['type'])) {
$this->type = $value['type'];
unset($value['type']);
}
if (isset($value['dir'])) {
$this->dir = $value['dir'];
unset($value['dir']);
}
if (isset($value['alias'])) {
$this->alias = $value['alias'];
unset($value['alias']);
}
if (isset($value['prefix'])) {
$this->prefix = $value['prefix'];
unset($value['prefix']);
}
if (isset($value['is_bundle'])) {
$this->isBundle = $value['is_bundle'];
unset($value['is_bundle']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (null !== $this->mapping) {
$output['mapping'] = $this->mapping;
}
if (null !== $this->type) {
$output['type'] = $this->type;
}
if (null !== $this->dir) {
$output['dir'] = $this->dir;
}
if (null !== $this->alias) {
$output['alias'] = $this->alias;
}
if (null !== $this->prefix) {
$output['prefix'] = $this->prefix;
}
if (null !== $this->isBundle) {
$output['is_bundle'] = $this->isBundle;
}
return $output;
}
}