1 | <?php |
||
14 | class Builder extends AbstractBuilder implements Fluent |
||
15 | { |
||
16 | use Traits\Fields; |
||
17 | use Traits\Dates; |
||
18 | use Traits\Aliases; |
||
19 | use Traits\Relations; |
||
20 | use Traits\Constraints; |
||
21 | use Traits\Macroable; |
||
22 | use Traits\Queueable; |
||
23 | use Traits\QueuesMacros; |
||
24 | use GedmoBuilderHints; |
||
25 | |||
26 | /** |
||
27 | * {@inheritdoc} |
||
28 | */ |
||
29 | 8 | public function table($name, callable $callback = null) |
|
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | 156 | public function entity(callable $callback = null) |
|
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | 12 | public function inheritance($type, callable $callback = null) |
|
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | 4 | public function singleTableInheritance(callable $callback = null) |
|
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | */ |
||
77 | 4 | public function joinedTableInheritance(callable $callback = null) |
|
81 | |||
82 | /** |
||
83 | * {@inheritdoc} |
||
84 | */ |
||
85 | 8 | public function embed($embeddable, $field = null, callable $callback = null) |
|
86 | { |
||
87 | 8 | $embedded = new Embedded( |
|
88 | 8 | $this->builder, |
|
89 | 8 | $this->namingStrategy, |
|
90 | 8 | $this->guessSingularField($embeddable, $field), |
|
91 | 4 | $embeddable |
|
92 | 4 | ); |
|
93 | |||
94 | 8 | $this->callbackAndQueue($embedded, $callback); |
|
95 | |||
96 | 8 | return $embedded; |
|
97 | } |
||
98 | |||
99 | /** |
||
100 | * {@inheritdoc} |
||
101 | */ |
||
102 | 12 | public function override($name, callable $callback) |
|
103 | { |
||
104 | 12 | $override = new Overrides\Override( |
|
105 | 12 | $this->getBuilder(), |
|
106 | 12 | $this->getNamingStrategy(), |
|
107 | 12 | $name, |
|
108 | 6 | $callback |
|
109 | 6 | ); |
|
110 | |||
111 | 12 | $this->queue($override); |
|
112 | |||
113 | 12 | return $override; |
|
114 | } |
||
115 | |||
116 | /** |
||
117 | * {@inheritdoc} |
||
118 | */ |
||
119 | 8 | public function events(callable $callback = null) |
|
127 | |||
128 | /** |
||
129 | * {@inheritdoc} |
||
130 | */ |
||
131 | 8 | public function listen(callable $callback = null) |
|
139 | |||
140 | /** |
||
141 | * {@inheritdoc} |
||
142 | */ |
||
143 | 196 | public function isEmbeddedClass() |
|
147 | |||
148 | /** |
||
149 | * @param string $name |
||
150 | * @param callable|null $callback |
||
151 | * |
||
152 | * @return Field |
||
153 | */ |
||
154 | 12 | protected function setArray($name, callable $callback = null) |
|
158 | |||
159 | /** |
||
160 | * @param string $method |
||
161 | * @param array $params |
||
162 | * |
||
163 | * @return mixed |
||
164 | */ |
||
165 | 384 | public function __call($method, $params) |
|
178 | |||
179 | /** |
||
180 | * {@inheritdoc} |
||
181 | */ |
||
182 | 196 | protected function disallowInEmbeddedClasses($message = '') |
|
188 | } |
||
189 |