1 | <?php |
||
46 | class Table implements NodeInterface |
||
47 | { |
||
48 | private $database; |
||
49 | |||
50 | /** |
||
51 | * Returns the name of the database. |
||
52 | * |
||
53 | * @return mixed |
||
54 | */ |
||
55 | public function getDatabase() |
||
59 | |||
60 | /** |
||
61 | * Sets the name of the database |
||
62 | * |
||
63 | * @param mixed $database |
||
64 | */ |
||
65 | public function setDatabase($database) |
||
69 | |||
70 | private $table; |
||
71 | |||
72 | /** |
||
73 | * Returns the table name. |
||
74 | * |
||
75 | * @return string |
||
76 | */ |
||
77 | public function getTable() |
||
81 | |||
82 | /** |
||
83 | * Sets the table name. |
||
84 | * |
||
85 | * @Important |
||
86 | * |
||
87 | * @param string $table |
||
88 | */ |
||
89 | public function setTable($table) |
||
93 | |||
94 | private $alias; |
||
95 | |||
96 | /** |
||
97 | * Returns the alias. |
||
98 | * |
||
99 | * @return string |
||
100 | */ |
||
101 | public function getAlias() |
||
105 | |||
106 | /** |
||
107 | * Sets the alias. |
||
108 | * |
||
109 | * @Important |
||
110 | * |
||
111 | * @param string $alias |
||
112 | */ |
||
113 | public function setAlias($alias) |
||
117 | |||
118 | private $joinType; |
||
119 | |||
120 | /** |
||
121 | * Returns the join type. |
||
122 | * |
||
123 | * @return string |
||
124 | */ |
||
125 | public function getJoinType() |
||
129 | |||
130 | /** |
||
131 | * Sets the join type (JOIN, LEFT JOIN, RIGHT JOIN, etc...). |
||
132 | * |
||
133 | * @Important |
||
134 | * |
||
135 | * @param string $joinType |
||
136 | */ |
||
137 | public function setJoinType($joinType) |
||
141 | |||
142 | private $refClause; |
||
143 | |||
144 | /** |
||
145 | * Returns the list of refClause statements. |
||
146 | * |
||
147 | * @return NodeInterface[]|NodeInterface |
||
148 | */ |
||
149 | public function getRefClause() |
||
153 | |||
154 | /** |
||
155 | * Sets the list of refClause statements. |
||
156 | * |
||
157 | * @Important |
||
158 | * |
||
159 | * @param NodeInterface[]|NodeInterface $refClause |
||
160 | */ |
||
161 | public function setRefClause($refClause) |
||
165 | |||
166 | /** |
||
167 | * @var Hint[] |
||
168 | */ |
||
169 | private $hints; |
||
170 | |||
171 | /** |
||
172 | * Return the list of table hints |
||
173 | * |
||
174 | * @return Hint[] |
||
175 | */ |
||
176 | public function getHints(): array |
||
180 | |||
181 | /** |
||
182 | * Set a list of table hints |
||
183 | * |
||
184 | * @param Hint[] $hints |
||
185 | */ |
||
186 | public function setHints(array $hints): void |
||
190 | |||
191 | /** |
||
192 | * Returns a Mouf instance descriptor describing this object. |
||
193 | * |
||
194 | * @param MoufManager $moufManager |
||
195 | * |
||
196 | * @return MoufInstanceDescriptor |
||
197 | */ |
||
198 | public function toInstanceDescriptor(MoufManager $moufManager) |
||
209 | |||
210 | /** |
||
211 | * Renders the object as a SQL string. |
||
212 | * |
||
213 | * @param array $parameters |
||
214 | * @param AbstractPlatform $platform |
||
215 | * @param int $indent |
||
216 | * @param int $conditionsMode |
||
217 | * |
||
218 | * @param bool $extrapolateParameters |
||
219 | * @return string |
||
220 | */ |
||
221 | public function toSql(array $parameters, AbstractPlatform $platform, int $indent = 0, $conditionsMode = self::CONDITION_APPLY, bool $extrapolateParameters = true): ?string |
||
246 | |||
247 | /** |
||
248 | * Walks the tree of nodes, calling the visitor passed in parameter. |
||
249 | * |
||
250 | * @param VisitorInterface $visitor |
||
251 | */ |
||
252 | public function walk(VisitorInterface $visitor) |
||
281 | } |
||
282 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)
or! empty(...)
instead.