@@ -29,48 +29,48 @@ |
||
29 | 29 | */ |
30 | 30 | class StreamOutput extends Output |
31 | 31 | { |
32 | - /** |
|
33 | - * @param resource $stream A stream resource |
|
34 | - * @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface) |
|
35 | - * @param bool|null $decorated Whether to decorate messages (null for auto-guessing) |
|
36 | - * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter) |
|
37 | - * |
|
38 | - * @throws InvalidArgumentException When first argument is not a real stream |
|
39 | - */ |
|
40 | - public function __construct($stream, int $verbosity = self::VERBOSITY_NORMAL, ?bool $decorated = null, ?OutputFormatterInterface $formatter = null) |
|
41 | - { |
|
42 | - } |
|
32 | + /** |
|
33 | + * @param resource $stream A stream resource |
|
34 | + * @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface) |
|
35 | + * @param bool|null $decorated Whether to decorate messages (null for auto-guessing) |
|
36 | + * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter) |
|
37 | + * |
|
38 | + * @throws InvalidArgumentException When first argument is not a real stream |
|
39 | + */ |
|
40 | + public function __construct($stream, int $verbosity = self::VERBOSITY_NORMAL, ?bool $decorated = null, ?OutputFormatterInterface $formatter = null) |
|
41 | + { |
|
42 | + } |
|
43 | 43 | |
44 | - /** |
|
45 | - * Gets the stream attached to this StreamOutput instance. |
|
46 | - * |
|
47 | - * @return resource |
|
48 | - */ |
|
49 | - public function getStream() |
|
50 | - { |
|
51 | - } |
|
44 | + /** |
|
45 | + * Gets the stream attached to this StreamOutput instance. |
|
46 | + * |
|
47 | + * @return resource |
|
48 | + */ |
|
49 | + public function getStream() |
|
50 | + { |
|
51 | + } |
|
52 | 52 | |
53 | - /** |
|
54 | - * @return void |
|
55 | - */ |
|
56 | - protected function doWrite(string $message, bool $newline) |
|
57 | - { |
|
58 | - } |
|
53 | + /** |
|
54 | + * @return void |
|
55 | + */ |
|
56 | + protected function doWrite(string $message, bool $newline) |
|
57 | + { |
|
58 | + } |
|
59 | 59 | |
60 | - /** |
|
61 | - * Returns true if the stream supports colorization. |
|
62 | - * |
|
63 | - * Colorization is disabled if not supported by the stream: |
|
64 | - * |
|
65 | - * This is tricky on Windows, because Cygwin, Msys2 etc emulate pseudo |
|
66 | - * terminals via named pipes, so we can only check the environment. |
|
67 | - * |
|
68 | - * Reference: Composer\XdebugHandler\Process::supportsColor |
|
69 | - * https://github.com/composer/xdebug-handler |
|
70 | - * |
|
71 | - * @return bool true if the stream supports colorization, false otherwise |
|
72 | - */ |
|
73 | - protected function hasColorSupport(): bool |
|
74 | - { |
|
75 | - } |
|
60 | + /** |
|
61 | + * Returns true if the stream supports colorization. |
|
62 | + * |
|
63 | + * Colorization is disabled if not supported by the stream: |
|
64 | + * |
|
65 | + * This is tricky on Windows, because Cygwin, Msys2 etc emulate pseudo |
|
66 | + * terminals via named pipes, so we can only check the environment. |
|
67 | + * |
|
68 | + * Reference: Composer\XdebugHandler\Process::supportsColor |
|
69 | + * https://github.com/composer/xdebug-handler |
|
70 | + * |
|
71 | + * @return bool true if the stream supports colorization, false otherwise |
|
72 | + */ |
|
73 | + protected function hasColorSupport(): bool |
|
74 | + { |
|
75 | + } |
|
76 | 76 | } |
@@ -53,918 +53,918 @@ |
||
53 | 53 | */ |
54 | 54 | class Connection |
55 | 55 | { |
56 | - /** |
|
57 | - * Represents an array of ints to be expanded by Doctrine SQL parsing. |
|
58 | - * |
|
59 | - * @deprecated Use {@see ArrayParameterType::INTEGER} instead. |
|
60 | - */ |
|
61 | - public const PARAM_INT_ARRAY = ArrayParameterType::INTEGER; |
|
62 | - |
|
63 | - /** |
|
64 | - * Represents an array of strings to be expanded by Doctrine SQL parsing. |
|
65 | - * |
|
66 | - * @deprecated Use {@see ArrayParameterType::STRING} instead. |
|
67 | - */ |
|
68 | - public const PARAM_STR_ARRAY = ArrayParameterType::STRING; |
|
69 | - |
|
70 | - /** |
|
71 | - * Represents an array of ascii strings to be expanded by Doctrine SQL parsing. |
|
72 | - * |
|
73 | - * @deprecated Use {@see ArrayParameterType::ASCII} instead. |
|
74 | - */ |
|
75 | - public const PARAM_ASCII_STR_ARRAY = ArrayParameterType::ASCII; |
|
76 | - |
|
77 | - /** |
|
78 | - * Offset by which PARAM_* constants are detected as arrays of the param type. |
|
79 | - * |
|
80 | - * @internal Should be used only within the wrapper layer. |
|
81 | - */ |
|
82 | - public const ARRAY_PARAM_OFFSET = 100; |
|
83 | - |
|
84 | - /** |
|
85 | - * The wrapped driver connection. |
|
86 | - * |
|
87 | - * @var DriverConnection|null |
|
88 | - */ |
|
89 | - protected $_conn; |
|
90 | - |
|
91 | - /** @var Configuration */ |
|
92 | - protected $_config; |
|
93 | - |
|
94 | - /** |
|
95 | - * @deprecated |
|
96 | - * |
|
97 | - * @var EventManager |
|
98 | - */ |
|
99 | - protected $_eventManager; |
|
100 | - |
|
101 | - /** |
|
102 | - * @deprecated Use {@see createExpressionBuilder()} instead. |
|
103 | - * |
|
104 | - * @var ExpressionBuilder |
|
105 | - */ |
|
106 | - protected $_expr; |
|
107 | - |
|
108 | - /** |
|
109 | - * The schema manager. |
|
110 | - * |
|
111 | - * @deprecated Use {@see createSchemaManager()} instead. |
|
112 | - * |
|
113 | - * @var AbstractSchemaManager|null |
|
114 | - */ |
|
115 | - protected $_schemaManager; |
|
116 | - |
|
117 | - /** |
|
118 | - * The used DBAL driver. |
|
119 | - * |
|
120 | - * @var Driver |
|
121 | - */ |
|
122 | - protected $_driver; |
|
123 | - |
|
124 | - /** |
|
125 | - * Initializes a new instance of the Connection class. |
|
126 | - * |
|
127 | - * @internal The connection can be only instantiated by the driver manager. |
|
128 | - * |
|
129 | - * @param array<string,mixed> $params The connection parameters. |
|
130 | - * @param Driver $driver The driver to use. |
|
131 | - * @param Configuration|null $config The configuration, optional. |
|
132 | - * @param EventManager|null $eventManager The event manager, optional. |
|
133 | - * @psalm-param Params $params |
|
134 | - * |
|
135 | - * @throws Exception |
|
136 | - */ |
|
137 | - public function __construct(#[SensitiveParameter] |
|
138 | - array $params, Driver $driver, ?Configuration $config = null, ?EventManager $eventManager = null) |
|
139 | - { |
|
140 | - } |
|
141 | - |
|
142 | - /** |
|
143 | - * Gets the parameters used during instantiation. |
|
144 | - * |
|
145 | - * @internal |
|
146 | - * |
|
147 | - * @return array<string,mixed> |
|
148 | - * @psalm-return Params |
|
149 | - */ |
|
150 | - public function getParams() |
|
151 | - { |
|
152 | - } |
|
153 | - |
|
154 | - /** |
|
155 | - * Gets the name of the currently selected database. |
|
156 | - * |
|
157 | - * @return string|null The name of the database or NULL if a database is not selected. |
|
158 | - * The platforms which don't support the concept of a database (e.g. embedded databases) |
|
159 | - * must always return a string as an indicator of an implicitly selected database. |
|
160 | - * |
|
161 | - * @throws Exception |
|
162 | - */ |
|
163 | - public function getDatabase() |
|
164 | - { |
|
165 | - } |
|
166 | - |
|
167 | - /** |
|
168 | - * Gets the DBAL driver instance. |
|
169 | - * |
|
170 | - * @return Driver |
|
171 | - */ |
|
172 | - public function getDriver() |
|
173 | - { |
|
174 | - } |
|
175 | - |
|
176 | - /** |
|
177 | - * Gets the Configuration used by the Connection. |
|
178 | - * |
|
179 | - * @return Configuration |
|
180 | - */ |
|
181 | - public function getConfiguration() |
|
182 | - { |
|
183 | - } |
|
184 | - |
|
185 | - /** |
|
186 | - * Gets the EventManager used by the Connection. |
|
187 | - * |
|
188 | - * @deprecated |
|
189 | - * |
|
190 | - * @return EventManager |
|
191 | - */ |
|
192 | - public function getEventManager() |
|
193 | - { |
|
194 | - } |
|
195 | - |
|
196 | - /** |
|
197 | - * Gets the DatabasePlatform for the connection. |
|
198 | - * |
|
199 | - * @return AbstractPlatform |
|
200 | - * |
|
201 | - * @throws Exception |
|
202 | - */ |
|
203 | - public function getDatabasePlatform() |
|
204 | - { |
|
205 | - } |
|
206 | - |
|
207 | - /** |
|
208 | - * Creates an expression builder for the connection. |
|
209 | - */ |
|
210 | - public function createExpressionBuilder(): ExpressionBuilder |
|
211 | - { |
|
212 | - } |
|
213 | - |
|
214 | - /** |
|
215 | - * Gets the ExpressionBuilder for the connection. |
|
216 | - * |
|
217 | - * @deprecated Use {@see createExpressionBuilder()} instead. |
|
218 | - * |
|
219 | - * @return ExpressionBuilder |
|
220 | - */ |
|
221 | - public function getExpressionBuilder() |
|
222 | - { |
|
223 | - } |
|
224 | - |
|
225 | - /** |
|
226 | - * Establishes the connection with the database. |
|
227 | - * |
|
228 | - * @internal This method will be made protected in DBAL 4.0. |
|
229 | - * |
|
230 | - * @return bool TRUE if the connection was successfully established, FALSE if |
|
231 | - * the connection is already open. |
|
232 | - * |
|
233 | - * @throws Exception |
|
234 | - * |
|
235 | - * @psalm-assert !null $this->_conn |
|
236 | - */ |
|
237 | - public function connect() |
|
238 | - { |
|
239 | - } |
|
240 | - |
|
241 | - /** |
|
242 | - * Returns the current auto-commit mode for this connection. |
|
243 | - * |
|
244 | - * @see setAutoCommit |
|
245 | - * |
|
246 | - * @return bool True if auto-commit mode is currently enabled for this connection, false otherwise. |
|
247 | - */ |
|
248 | - public function isAutoCommit() |
|
249 | - { |
|
250 | - } |
|
251 | - |
|
252 | - /** |
|
253 | - * Sets auto-commit mode for this connection. |
|
254 | - * |
|
255 | - * If a connection is in auto-commit mode, then all its SQL statements will be executed and committed as individual |
|
256 | - * transactions. Otherwise, its SQL statements are grouped into transactions that are terminated by a call to either |
|
257 | - * the method commit or the method rollback. By default, new connections are in auto-commit mode. |
|
258 | - * |
|
259 | - * NOTE: If this method is called during a transaction and the auto-commit mode is changed, the transaction is |
|
260 | - * committed. If this method is called and the auto-commit mode is not changed, the call is a no-op. |
|
261 | - * |
|
262 | - * @see isAutoCommit |
|
263 | - * |
|
264 | - * @param bool $autoCommit True to enable auto-commit mode; false to disable it. |
|
265 | - * |
|
266 | - * @return void |
|
267 | - */ |
|
268 | - public function setAutoCommit($autoCommit) |
|
269 | - { |
|
270 | - } |
|
271 | - |
|
272 | - /** |
|
273 | - * Prepares and executes an SQL query and returns the first row of the result |
|
274 | - * as an associative array. |
|
275 | - * |
|
276 | - * @param string $query SQL query |
|
277 | - * @param list<mixed>|array<string, mixed> $params Query parameters |
|
278 | - * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
279 | - * |
|
280 | - * @return array<string, mixed>|false False is returned if no rows are found. |
|
281 | - * |
|
282 | - * @throws Exception |
|
283 | - */ |
|
284 | - public function fetchAssociative(string $query, array $params = [], array $types = []) |
|
285 | - { |
|
286 | - } |
|
287 | - |
|
288 | - /** |
|
289 | - * Prepares and executes an SQL query and returns the first row of the result |
|
290 | - * as a numerically indexed array. |
|
291 | - * |
|
292 | - * @param string $query SQL query |
|
293 | - * @param list<mixed>|array<string, mixed> $params Query parameters |
|
294 | - * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
295 | - * |
|
296 | - * @return list<mixed>|false False is returned if no rows are found. |
|
297 | - * |
|
298 | - * @throws Exception |
|
299 | - */ |
|
300 | - public function fetchNumeric(string $query, array $params = [], array $types = []) |
|
301 | - { |
|
302 | - } |
|
303 | - |
|
304 | - /** |
|
305 | - * Prepares and executes an SQL query and returns the value of a single column |
|
306 | - * of the first row of the result. |
|
307 | - * |
|
308 | - * @param string $query SQL query |
|
309 | - * @param list<mixed>|array<string, mixed> $params Query parameters |
|
310 | - * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
311 | - * |
|
312 | - * @return mixed|false False is returned if no rows are found. |
|
313 | - * |
|
314 | - * @throws Exception |
|
315 | - */ |
|
316 | - public function fetchOne(string $query, array $params = [], array $types = []) |
|
317 | - { |
|
318 | - } |
|
319 | - |
|
320 | - /** |
|
321 | - * Whether an actual connection to the database is established. |
|
322 | - * |
|
323 | - * @return bool |
|
324 | - */ |
|
325 | - public function isConnected() |
|
326 | - { |
|
327 | - } |
|
328 | - |
|
329 | - /** |
|
330 | - * Checks whether a transaction is currently active. |
|
331 | - * |
|
332 | - * @return bool TRUE if a transaction is currently active, FALSE otherwise. |
|
333 | - */ |
|
334 | - public function isTransactionActive() |
|
335 | - { |
|
336 | - } |
|
337 | - |
|
338 | - /** |
|
339 | - * Executes an SQL DELETE statement on a table. |
|
340 | - * |
|
341 | - * Table expression and columns are not escaped and are not safe for user-input. |
|
342 | - * |
|
343 | - * @param string $table Table name |
|
344 | - * @param array<string, mixed> $criteria Deletion criteria |
|
345 | - * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
346 | - * |
|
347 | - * @return int|string The number of affected rows. |
|
348 | - * |
|
349 | - * @throws Exception |
|
350 | - */ |
|
351 | - public function delete($table, array $criteria, array $types = []) |
|
352 | - { |
|
353 | - } |
|
354 | - |
|
355 | - /** |
|
356 | - * Closes the connection. |
|
357 | - * |
|
358 | - * @return void |
|
359 | - */ |
|
360 | - public function close() |
|
361 | - { |
|
362 | - } |
|
363 | - |
|
364 | - /** |
|
365 | - * Sets the transaction isolation level. |
|
366 | - * |
|
367 | - * @param TransactionIsolationLevel::* $level The level to set. |
|
368 | - * |
|
369 | - * @return int|string |
|
370 | - * |
|
371 | - * @throws Exception |
|
372 | - */ |
|
373 | - public function setTransactionIsolation($level) |
|
374 | - { |
|
375 | - } |
|
376 | - |
|
377 | - /** |
|
378 | - * Gets the currently active transaction isolation level. |
|
379 | - * |
|
380 | - * @return TransactionIsolationLevel::* The current transaction isolation level. |
|
381 | - * |
|
382 | - * @throws Exception |
|
383 | - */ |
|
384 | - public function getTransactionIsolation() |
|
385 | - { |
|
386 | - } |
|
387 | - |
|
388 | - /** |
|
389 | - * Executes an SQL UPDATE statement on a table. |
|
390 | - * |
|
391 | - * Table expression and columns are not escaped and are not safe for user-input. |
|
392 | - * |
|
393 | - * @param string $table Table name |
|
394 | - * @param array<string, mixed> $data Column-value pairs |
|
395 | - * @param array<string, mixed> $criteria Update criteria |
|
396 | - * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
397 | - * |
|
398 | - * @return int|string The number of affected rows. |
|
399 | - * |
|
400 | - * @throws Exception |
|
401 | - */ |
|
402 | - public function update($table, array $data, array $criteria, array $types = []) |
|
403 | - { |
|
404 | - } |
|
405 | - |
|
406 | - /** |
|
407 | - * Inserts a table row with specified data. |
|
408 | - * |
|
409 | - * Table expression and columns are not escaped and are not safe for user-input. |
|
410 | - * |
|
411 | - * @param string $table Table name |
|
412 | - * @param array<string, mixed> $data Column-value pairs |
|
413 | - * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
414 | - * |
|
415 | - * @return int|string The number of affected rows. |
|
416 | - * |
|
417 | - * @throws Exception |
|
418 | - */ |
|
419 | - public function insert($table, array $data, array $types = []) |
|
420 | - { |
|
421 | - } |
|
422 | - |
|
423 | - /** |
|
424 | - * Quotes a string so it can be safely used as a table or column name, even if |
|
425 | - * it is a reserved name. |
|
426 | - * |
|
427 | - * Delimiting style depends on the underlying database platform that is being used. |
|
428 | - * |
|
429 | - * NOTE: Just because you CAN use quoted identifiers does not mean |
|
430 | - * you SHOULD use them. In general, they end up causing way more |
|
431 | - * problems than they solve. |
|
432 | - * |
|
433 | - * @param string $str The name to be quoted. |
|
434 | - * |
|
435 | - * @return string The quoted name. |
|
436 | - */ |
|
437 | - public function quoteIdentifier($str) |
|
438 | - { |
|
439 | - } |
|
440 | - |
|
441 | - /** |
|
442 | - * The usage of this method is discouraged. Use prepared statements |
|
443 | - * or {@see AbstractPlatform::quoteStringLiteral()} instead. |
|
444 | - * |
|
445 | - * @param mixed $value |
|
446 | - * @param int|string|Type|null $type |
|
447 | - * |
|
448 | - * @return mixed |
|
449 | - */ |
|
450 | - public function quote($value, $type = ParameterType::STRING) |
|
451 | - { |
|
452 | - } |
|
453 | - |
|
454 | - /** |
|
455 | - * Prepares and executes an SQL query and returns the result as an array of numeric arrays. |
|
456 | - * |
|
457 | - * @param string $query SQL query |
|
458 | - * @param list<mixed>|array<string, mixed> $params Query parameters |
|
459 | - * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
460 | - * |
|
461 | - * @return list<list<mixed>> |
|
462 | - * |
|
463 | - * @throws Exception |
|
464 | - */ |
|
465 | - public function fetchAllNumeric(string $query, array $params = [], array $types = []): array |
|
466 | - { |
|
467 | - } |
|
468 | - |
|
469 | - /** |
|
470 | - * Prepares and executes an SQL query and returns the result as an array of associative arrays. |
|
471 | - * |
|
472 | - * @param string $query SQL query |
|
473 | - * @param list<mixed>|array<string, mixed> $params Query parameters |
|
474 | - * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
475 | - * |
|
476 | - * @return list<array<string,mixed>> |
|
477 | - * |
|
478 | - * @throws Exception |
|
479 | - */ |
|
480 | - public function fetchAllAssociative(string $query, array $params = [], array $types = []): array |
|
481 | - { |
|
482 | - } |
|
483 | - |
|
484 | - /** |
|
485 | - * Prepares and executes an SQL query and returns the result as an associative array with the keys |
|
486 | - * mapped to the first column and the values mapped to the second column. |
|
487 | - * |
|
488 | - * @param string $query SQL query |
|
489 | - * @param list<mixed>|array<string, mixed> $params Query parameters |
|
490 | - * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
491 | - * |
|
492 | - * @return array<mixed,mixed> |
|
493 | - * |
|
494 | - * @throws Exception |
|
495 | - */ |
|
496 | - public function fetchAllKeyValue(string $query, array $params = [], array $types = []): array |
|
497 | - { |
|
498 | - } |
|
499 | - |
|
500 | - /** |
|
501 | - * Prepares and executes an SQL query and returns the result as an associative array with the keys mapped |
|
502 | - * to the first column and the values being an associative array representing the rest of the columns |
|
503 | - * and their values. |
|
504 | - * |
|
505 | - * @param string $query SQL query |
|
506 | - * @param list<mixed>|array<string, mixed> $params Query parameters |
|
507 | - * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
508 | - * |
|
509 | - * @return array<mixed,array<string,mixed>> |
|
510 | - * |
|
511 | - * @throws Exception |
|
512 | - */ |
|
513 | - public function fetchAllAssociativeIndexed(string $query, array $params = [], array $types = []): array |
|
514 | - { |
|
515 | - } |
|
516 | - |
|
517 | - /** |
|
518 | - * Prepares and executes an SQL query and returns the result as an array of the first column values. |
|
519 | - * |
|
520 | - * @param string $query SQL query |
|
521 | - * @param list<mixed>|array<string, mixed> $params Query parameters |
|
522 | - * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
523 | - * |
|
524 | - * @return list<mixed> |
|
525 | - * |
|
526 | - * @throws Exception |
|
527 | - */ |
|
528 | - public function fetchFirstColumn(string $query, array $params = [], array $types = []): array |
|
529 | - { |
|
530 | - } |
|
531 | - |
|
532 | - /** |
|
533 | - * Prepares and executes an SQL query and returns the result as an iterator over rows represented as numeric arrays. |
|
534 | - * |
|
535 | - * @param string $query SQL query |
|
536 | - * @param list<mixed>|array<string, mixed> $params Query parameters |
|
537 | - * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
538 | - * |
|
539 | - * @return Traversable<int,list<mixed>> |
|
540 | - * |
|
541 | - * @throws Exception |
|
542 | - */ |
|
543 | - public function iterateNumeric(string $query, array $params = [], array $types = []): Traversable |
|
544 | - { |
|
545 | - } |
|
546 | - |
|
547 | - /** |
|
548 | - * Prepares and executes an SQL query and returns the result as an iterator over rows represented |
|
549 | - * as associative arrays. |
|
550 | - * |
|
551 | - * @param string $query SQL query |
|
552 | - * @param list<mixed>|array<string, mixed> $params Query parameters |
|
553 | - * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
554 | - * |
|
555 | - * @return Traversable<int,array<string,mixed>> |
|
556 | - * |
|
557 | - * @throws Exception |
|
558 | - */ |
|
559 | - public function iterateAssociative(string $query, array $params = [], array $types = []): Traversable |
|
560 | - { |
|
561 | - } |
|
562 | - |
|
563 | - /** |
|
564 | - * Prepares and executes an SQL query and returns the result as an iterator with the keys |
|
565 | - * mapped to the first column and the values mapped to the second column. |
|
566 | - * |
|
567 | - * @param string $query SQL query |
|
568 | - * @param list<mixed>|array<string, mixed> $params Query parameters |
|
569 | - * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
570 | - * |
|
571 | - * @return Traversable<mixed,mixed> |
|
572 | - * |
|
573 | - * @throws Exception |
|
574 | - */ |
|
575 | - public function iterateKeyValue(string $query, array $params = [], array $types = []): Traversable |
|
576 | - { |
|
577 | - } |
|
578 | - |
|
579 | - /** |
|
580 | - * Prepares and executes an SQL query and returns the result as an iterator with the keys mapped |
|
581 | - * to the first column and the values being an associative array representing the rest of the columns |
|
582 | - * and their values. |
|
583 | - * |
|
584 | - * @param string $query SQL query |
|
585 | - * @param list<mixed>|array<string, mixed> $params Query parameters |
|
586 | - * @param array<int, int|string>|array<string, int|string> $types Parameter types |
|
587 | - * |
|
588 | - * @return Traversable<mixed,array<string,mixed>> |
|
589 | - * |
|
590 | - * @throws Exception |
|
591 | - */ |
|
592 | - public function iterateAssociativeIndexed(string $query, array $params = [], array $types = []): Traversable |
|
593 | - { |
|
594 | - } |
|
595 | - |
|
596 | - /** |
|
597 | - * Prepares and executes an SQL query and returns the result as an iterator over the first column values. |
|
598 | - * |
|
599 | - * @param string $query SQL query |
|
600 | - * @param list<mixed>|array<string, mixed> $params Query parameters |
|
601 | - * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
602 | - * |
|
603 | - * @return Traversable<int,mixed> |
|
604 | - * |
|
605 | - * @throws Exception |
|
606 | - */ |
|
607 | - public function iterateColumn(string $query, array $params = [], array $types = []): Traversable |
|
608 | - { |
|
609 | - } |
|
610 | - |
|
611 | - /** |
|
612 | - * Prepares an SQL statement. |
|
613 | - * |
|
614 | - * @param string $sql The SQL statement to prepare. |
|
615 | - * |
|
616 | - * @throws Exception |
|
617 | - */ |
|
618 | - public function prepare(string $sql): Statement |
|
619 | - { |
|
620 | - } |
|
621 | - |
|
622 | - /** |
|
623 | - * Executes an, optionally parameterized, SQL query. |
|
624 | - * |
|
625 | - * If the query is parametrized, a prepared statement is used. |
|
626 | - * If an SQLLogger is configured, the execution is logged. |
|
627 | - * |
|
628 | - * @param string $sql SQL query |
|
629 | - * @param list<mixed>|array<string, mixed> $params Query parameters |
|
630 | - * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
631 | - * |
|
632 | - * @throws Exception |
|
633 | - */ |
|
634 | - public function executeQuery(string $sql, array $params = [], $types = [], ?QueryCacheProfile $qcp = null): Result |
|
635 | - { |
|
636 | - } |
|
637 | - |
|
638 | - /** |
|
639 | - * Executes a caching query. |
|
640 | - * |
|
641 | - * @param string $sql SQL query |
|
642 | - * @param list<mixed>|array<string, mixed> $params Query parameters |
|
643 | - * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
644 | - * |
|
645 | - * @throws CacheException |
|
646 | - * @throws Exception |
|
647 | - */ |
|
648 | - public function executeCacheQuery($sql, $params, $types, QueryCacheProfile $qcp): Result |
|
649 | - { |
|
650 | - } |
|
651 | - |
|
652 | - /** |
|
653 | - * Executes an SQL statement with the given parameters and returns the number of affected rows. |
|
654 | - * |
|
655 | - * Could be used for: |
|
656 | - * - DML statements: INSERT, UPDATE, DELETE, etc. |
|
657 | - * - DDL statements: CREATE, DROP, ALTER, etc. |
|
658 | - * - DCL statements: GRANT, REVOKE, etc. |
|
659 | - * - Session control statements: ALTER SESSION, SET, DECLARE, etc. |
|
660 | - * - Other statements that don't yield a row set. |
|
661 | - * |
|
662 | - * This method supports PDO binding types as well as DBAL mapping types. |
|
663 | - * |
|
664 | - * @param string $sql SQL statement |
|
665 | - * @param list<mixed>|array<string, mixed> $params Statement parameters |
|
666 | - * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
667 | - * |
|
668 | - * @return int|string The number of affected rows. |
|
669 | - * |
|
670 | - * @throws Exception |
|
671 | - */ |
|
672 | - public function executeStatement($sql, array $params = [], array $types = []) |
|
673 | - { |
|
674 | - } |
|
675 | - |
|
676 | - /** |
|
677 | - * Returns the current transaction nesting level. |
|
678 | - * |
|
679 | - * @return int The nesting level. A value of 0 means there's no active transaction. |
|
680 | - */ |
|
681 | - public function getTransactionNestingLevel() |
|
682 | - { |
|
683 | - } |
|
684 | - |
|
685 | - /** |
|
686 | - * Returns the ID of the last inserted row, or the last value from a sequence object, |
|
687 | - * depending on the underlying driver. |
|
688 | - * |
|
689 | - * Note: This method may not return a meaningful or consistent result across different drivers, |
|
690 | - * because the underlying database may not even support the notion of AUTO_INCREMENT/IDENTITY |
|
691 | - * columns or sequences. |
|
692 | - * |
|
693 | - * @param string|null $name Name of the sequence object from which the ID should be returned. |
|
694 | - * |
|
695 | - * @return string|int|false A string representation of the last inserted ID. |
|
696 | - * |
|
697 | - * @throws Exception |
|
698 | - */ |
|
699 | - public function lastInsertId($name = null) |
|
700 | - { |
|
701 | - } |
|
702 | - |
|
703 | - /** |
|
704 | - * Executes a function in a transaction. |
|
705 | - * |
|
706 | - * The function gets passed this Connection instance as an (optional) parameter. |
|
707 | - * |
|
708 | - * If an exception occurs during execution of the function or transaction commit, |
|
709 | - * the transaction is rolled back and the exception re-thrown. |
|
710 | - * |
|
711 | - * @param Closure(self):T $func The function to execute transactionally. |
|
712 | - * |
|
713 | - * @return T The value returned by $func |
|
714 | - * |
|
715 | - * @throws Throwable |
|
716 | - * |
|
717 | - * @template T |
|
718 | - */ |
|
719 | - public function transactional(Closure $func) |
|
720 | - { |
|
721 | - } |
|
722 | - |
|
723 | - /** |
|
724 | - * Sets if nested transactions should use savepoints. |
|
725 | - * |
|
726 | - * @param bool $nestTransactionsWithSavepoints |
|
727 | - * |
|
728 | - * @return void |
|
729 | - * |
|
730 | - * @throws Exception |
|
731 | - */ |
|
732 | - public function setNestTransactionsWithSavepoints($nestTransactionsWithSavepoints) |
|
733 | - { |
|
734 | - } |
|
735 | - |
|
736 | - /** |
|
737 | - * Gets if nested transactions should use savepoints. |
|
738 | - * |
|
739 | - * @return bool |
|
740 | - */ |
|
741 | - public function getNestTransactionsWithSavepoints() |
|
742 | - { |
|
743 | - } |
|
744 | - |
|
745 | - /** |
|
746 | - * Returns the savepoint name to use for nested transactions. |
|
747 | - * |
|
748 | - * @return string |
|
749 | - */ |
|
750 | - protected function _getNestedTransactionSavePointName() |
|
751 | - { |
|
752 | - } |
|
753 | - |
|
754 | - /** |
|
755 | - * @return bool |
|
756 | - * |
|
757 | - * @throws Exception |
|
758 | - */ |
|
759 | - public function beginTransaction() |
|
760 | - { |
|
761 | - } |
|
762 | - |
|
763 | - /** |
|
764 | - * @return bool |
|
765 | - * |
|
766 | - * @throws Exception |
|
767 | - */ |
|
768 | - public function commit() |
|
769 | - { |
|
770 | - } |
|
771 | - |
|
772 | - /** |
|
773 | - * Cancels any database changes done during the current transaction. |
|
774 | - * |
|
775 | - * @return bool |
|
776 | - * |
|
777 | - * @throws Exception |
|
778 | - */ |
|
779 | - public function rollBack() |
|
780 | - { |
|
781 | - } |
|
782 | - |
|
783 | - /** |
|
784 | - * Creates a new savepoint. |
|
785 | - * |
|
786 | - * @param string $savepoint The name of the savepoint to create. |
|
787 | - * |
|
788 | - * @return void |
|
789 | - * |
|
790 | - * @throws Exception |
|
791 | - */ |
|
792 | - public function createSavepoint($savepoint) |
|
793 | - { |
|
794 | - } |
|
795 | - |
|
796 | - /** |
|
797 | - * Releases the given savepoint. |
|
798 | - * |
|
799 | - * @param string $savepoint The name of the savepoint to release. |
|
800 | - * |
|
801 | - * @return void |
|
802 | - * |
|
803 | - * @throws Exception |
|
804 | - */ |
|
805 | - public function releaseSavepoint($savepoint) |
|
806 | - { |
|
807 | - } |
|
808 | - |
|
809 | - /** |
|
810 | - * Rolls back to the given savepoint. |
|
811 | - * |
|
812 | - * @param string $savepoint The name of the savepoint to rollback to. |
|
813 | - * |
|
814 | - * @return void |
|
815 | - * |
|
816 | - * @throws Exception |
|
817 | - */ |
|
818 | - public function rollbackSavepoint($savepoint) |
|
819 | - { |
|
820 | - } |
|
821 | - |
|
822 | - /** |
|
823 | - * Gets the wrapped driver connection. |
|
824 | - * |
|
825 | - * @deprecated Use {@link getNativeConnection()} to access the native connection. |
|
826 | - * |
|
827 | - * @return DriverConnection |
|
828 | - * |
|
829 | - * @throws Exception |
|
830 | - */ |
|
831 | - public function getWrappedConnection() |
|
832 | - { |
|
833 | - } |
|
834 | - |
|
835 | - /** @return resource|object */ |
|
836 | - public function getNativeConnection() |
|
837 | - { |
|
838 | - } |
|
839 | - |
|
840 | - /** |
|
841 | - * Creates a SchemaManager that can be used to inspect or change the |
|
842 | - * database schema through the connection. |
|
843 | - * |
|
844 | - * @throws Exception |
|
845 | - */ |
|
846 | - public function createSchemaManager(): AbstractSchemaManager |
|
847 | - { |
|
848 | - } |
|
849 | - |
|
850 | - /** |
|
851 | - * Gets the SchemaManager that can be used to inspect or change the |
|
852 | - * database schema through the connection. |
|
853 | - * |
|
854 | - * @deprecated Use {@see createSchemaManager()} instead. |
|
855 | - * |
|
856 | - * @return AbstractSchemaManager |
|
857 | - * |
|
858 | - * @throws Exception |
|
859 | - */ |
|
860 | - public function getSchemaManager() |
|
861 | - { |
|
862 | - } |
|
863 | - |
|
864 | - /** |
|
865 | - * Marks the current transaction so that the only possible |
|
866 | - * outcome for the transaction to be rolled back. |
|
867 | - * |
|
868 | - * @return void |
|
869 | - * |
|
870 | - * @throws ConnectionException If no transaction is active. |
|
871 | - */ |
|
872 | - public function setRollbackOnly() |
|
873 | - { |
|
874 | - } |
|
875 | - |
|
876 | - /** |
|
877 | - * Checks whether the current transaction is marked for rollback only. |
|
878 | - * |
|
879 | - * @return bool |
|
880 | - * |
|
881 | - * @throws ConnectionException If no transaction is active. |
|
882 | - */ |
|
883 | - public function isRollbackOnly() |
|
884 | - { |
|
885 | - } |
|
886 | - |
|
887 | - /** |
|
888 | - * Converts a given value to its database representation according to the conversion |
|
889 | - * rules of a specific DBAL mapping type. |
|
890 | - * |
|
891 | - * @param mixed $value The value to convert. |
|
892 | - * @param string $type The name of the DBAL mapping type. |
|
893 | - * |
|
894 | - * @return mixed The converted value. |
|
895 | - * |
|
896 | - * @throws Exception |
|
897 | - */ |
|
898 | - public function convertToDatabaseValue($value, $type) |
|
899 | - { |
|
900 | - } |
|
901 | - |
|
902 | - /** |
|
903 | - * Converts a given value to its PHP representation according to the conversion |
|
904 | - * rules of a specific DBAL mapping type. |
|
905 | - * |
|
906 | - * @param mixed $value The value to convert. |
|
907 | - * @param string $type The name of the DBAL mapping type. |
|
908 | - * |
|
909 | - * @return mixed The converted type. |
|
910 | - * |
|
911 | - * @throws Exception |
|
912 | - */ |
|
913 | - public function convertToPHPValue($value, $type) |
|
914 | - { |
|
915 | - } |
|
916 | - |
|
917 | - /** |
|
918 | - * Creates a new instance of a SQL query builder. |
|
919 | - * |
|
920 | - * @return QueryBuilder |
|
921 | - */ |
|
922 | - public function createQueryBuilder() |
|
923 | - { |
|
924 | - } |
|
925 | - |
|
926 | - /** |
|
927 | - * @internal |
|
928 | - * |
|
929 | - * @param list<mixed>|array<string, mixed> $params |
|
930 | - * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types |
|
931 | - */ |
|
932 | - final public function convertExceptionDuringQuery(Driver\Exception $e, string $sql, array $params = [], array $types = []): DriverException |
|
933 | - { |
|
934 | - } |
|
935 | - |
|
936 | - /** @internal */ |
|
937 | - final public function convertException(Driver\Exception $e): DriverException |
|
938 | - { |
|
939 | - } |
|
940 | - |
|
941 | - /** |
|
942 | - * BC layer for a wide-spread use-case of old DBAL APIs |
|
943 | - * |
|
944 | - * @deprecated Use {@see executeStatement()} instead |
|
945 | - * |
|
946 | - * @param array<mixed> $params The query parameters |
|
947 | - * @param array<int|string|null> $types The parameter types |
|
948 | - */ |
|
949 | - public function executeUpdate(string $sql, array $params = [], array $types = []): int |
|
950 | - { |
|
951 | - } |
|
952 | - |
|
953 | - /** |
|
954 | - * BC layer for a wide-spread use-case of old DBAL APIs |
|
955 | - * |
|
956 | - * @deprecated Use {@see executeQuery()} instead |
|
957 | - */ |
|
958 | - public function query(string $sql): Result |
|
959 | - { |
|
960 | - } |
|
961 | - |
|
962 | - /** |
|
963 | - * BC layer for a wide-spread use-case of old DBAL APIs |
|
964 | - * |
|
965 | - * @deprecated please use {@see executeStatement()} instead |
|
966 | - */ |
|
967 | - public function exec(string $sql): int |
|
968 | - { |
|
969 | - } |
|
56 | + /** |
|
57 | + * Represents an array of ints to be expanded by Doctrine SQL parsing. |
|
58 | + * |
|
59 | + * @deprecated Use {@see ArrayParameterType::INTEGER} instead. |
|
60 | + */ |
|
61 | + public const PARAM_INT_ARRAY = ArrayParameterType::INTEGER; |
|
62 | + |
|
63 | + /** |
|
64 | + * Represents an array of strings to be expanded by Doctrine SQL parsing. |
|
65 | + * |
|
66 | + * @deprecated Use {@see ArrayParameterType::STRING} instead. |
|
67 | + */ |
|
68 | + public const PARAM_STR_ARRAY = ArrayParameterType::STRING; |
|
69 | + |
|
70 | + /** |
|
71 | + * Represents an array of ascii strings to be expanded by Doctrine SQL parsing. |
|
72 | + * |
|
73 | + * @deprecated Use {@see ArrayParameterType::ASCII} instead. |
|
74 | + */ |
|
75 | + public const PARAM_ASCII_STR_ARRAY = ArrayParameterType::ASCII; |
|
76 | + |
|
77 | + /** |
|
78 | + * Offset by which PARAM_* constants are detected as arrays of the param type. |
|
79 | + * |
|
80 | + * @internal Should be used only within the wrapper layer. |
|
81 | + */ |
|
82 | + public const ARRAY_PARAM_OFFSET = 100; |
|
83 | + |
|
84 | + /** |
|
85 | + * The wrapped driver connection. |
|
86 | + * |
|
87 | + * @var DriverConnection|null |
|
88 | + */ |
|
89 | + protected $_conn; |
|
90 | + |
|
91 | + /** @var Configuration */ |
|
92 | + protected $_config; |
|
93 | + |
|
94 | + /** |
|
95 | + * @deprecated |
|
96 | + * |
|
97 | + * @var EventManager |
|
98 | + */ |
|
99 | + protected $_eventManager; |
|
100 | + |
|
101 | + /** |
|
102 | + * @deprecated Use {@see createExpressionBuilder()} instead. |
|
103 | + * |
|
104 | + * @var ExpressionBuilder |
|
105 | + */ |
|
106 | + protected $_expr; |
|
107 | + |
|
108 | + /** |
|
109 | + * The schema manager. |
|
110 | + * |
|
111 | + * @deprecated Use {@see createSchemaManager()} instead. |
|
112 | + * |
|
113 | + * @var AbstractSchemaManager|null |
|
114 | + */ |
|
115 | + protected $_schemaManager; |
|
116 | + |
|
117 | + /** |
|
118 | + * The used DBAL driver. |
|
119 | + * |
|
120 | + * @var Driver |
|
121 | + */ |
|
122 | + protected $_driver; |
|
123 | + |
|
124 | + /** |
|
125 | + * Initializes a new instance of the Connection class. |
|
126 | + * |
|
127 | + * @internal The connection can be only instantiated by the driver manager. |
|
128 | + * |
|
129 | + * @param array<string,mixed> $params The connection parameters. |
|
130 | + * @param Driver $driver The driver to use. |
|
131 | + * @param Configuration|null $config The configuration, optional. |
|
132 | + * @param EventManager|null $eventManager The event manager, optional. |
|
133 | + * @psalm-param Params $params |
|
134 | + * |
|
135 | + * @throws Exception |
|
136 | + */ |
|
137 | + public function __construct(#[SensitiveParameter] |
|
138 | + array $params, Driver $driver, ?Configuration $config = null, ?EventManager $eventManager = null) |
|
139 | + { |
|
140 | + } |
|
141 | + |
|
142 | + /** |
|
143 | + * Gets the parameters used during instantiation. |
|
144 | + * |
|
145 | + * @internal |
|
146 | + * |
|
147 | + * @return array<string,mixed> |
|
148 | + * @psalm-return Params |
|
149 | + */ |
|
150 | + public function getParams() |
|
151 | + { |
|
152 | + } |
|
153 | + |
|
154 | + /** |
|
155 | + * Gets the name of the currently selected database. |
|
156 | + * |
|
157 | + * @return string|null The name of the database or NULL if a database is not selected. |
|
158 | + * The platforms which don't support the concept of a database (e.g. embedded databases) |
|
159 | + * must always return a string as an indicator of an implicitly selected database. |
|
160 | + * |
|
161 | + * @throws Exception |
|
162 | + */ |
|
163 | + public function getDatabase() |
|
164 | + { |
|
165 | + } |
|
166 | + |
|
167 | + /** |
|
168 | + * Gets the DBAL driver instance. |
|
169 | + * |
|
170 | + * @return Driver |
|
171 | + */ |
|
172 | + public function getDriver() |
|
173 | + { |
|
174 | + } |
|
175 | + |
|
176 | + /** |
|
177 | + * Gets the Configuration used by the Connection. |
|
178 | + * |
|
179 | + * @return Configuration |
|
180 | + */ |
|
181 | + public function getConfiguration() |
|
182 | + { |
|
183 | + } |
|
184 | + |
|
185 | + /** |
|
186 | + * Gets the EventManager used by the Connection. |
|
187 | + * |
|
188 | + * @deprecated |
|
189 | + * |
|
190 | + * @return EventManager |
|
191 | + */ |
|
192 | + public function getEventManager() |
|
193 | + { |
|
194 | + } |
|
195 | + |
|
196 | + /** |
|
197 | + * Gets the DatabasePlatform for the connection. |
|
198 | + * |
|
199 | + * @return AbstractPlatform |
|
200 | + * |
|
201 | + * @throws Exception |
|
202 | + */ |
|
203 | + public function getDatabasePlatform() |
|
204 | + { |
|
205 | + } |
|
206 | + |
|
207 | + /** |
|
208 | + * Creates an expression builder for the connection. |
|
209 | + */ |
|
210 | + public function createExpressionBuilder(): ExpressionBuilder |
|
211 | + { |
|
212 | + } |
|
213 | + |
|
214 | + /** |
|
215 | + * Gets the ExpressionBuilder for the connection. |
|
216 | + * |
|
217 | + * @deprecated Use {@see createExpressionBuilder()} instead. |
|
218 | + * |
|
219 | + * @return ExpressionBuilder |
|
220 | + */ |
|
221 | + public function getExpressionBuilder() |
|
222 | + { |
|
223 | + } |
|
224 | + |
|
225 | + /** |
|
226 | + * Establishes the connection with the database. |
|
227 | + * |
|
228 | + * @internal This method will be made protected in DBAL 4.0. |
|
229 | + * |
|
230 | + * @return bool TRUE if the connection was successfully established, FALSE if |
|
231 | + * the connection is already open. |
|
232 | + * |
|
233 | + * @throws Exception |
|
234 | + * |
|
235 | + * @psalm-assert !null $this->_conn |
|
236 | + */ |
|
237 | + public function connect() |
|
238 | + { |
|
239 | + } |
|
240 | + |
|
241 | + /** |
|
242 | + * Returns the current auto-commit mode for this connection. |
|
243 | + * |
|
244 | + * @see setAutoCommit |
|
245 | + * |
|
246 | + * @return bool True if auto-commit mode is currently enabled for this connection, false otherwise. |
|
247 | + */ |
|
248 | + public function isAutoCommit() |
|
249 | + { |
|
250 | + } |
|
251 | + |
|
252 | + /** |
|
253 | + * Sets auto-commit mode for this connection. |
|
254 | + * |
|
255 | + * If a connection is in auto-commit mode, then all its SQL statements will be executed and committed as individual |
|
256 | + * transactions. Otherwise, its SQL statements are grouped into transactions that are terminated by a call to either |
|
257 | + * the method commit or the method rollback. By default, new connections are in auto-commit mode. |
|
258 | + * |
|
259 | + * NOTE: If this method is called during a transaction and the auto-commit mode is changed, the transaction is |
|
260 | + * committed. If this method is called and the auto-commit mode is not changed, the call is a no-op. |
|
261 | + * |
|
262 | + * @see isAutoCommit |
|
263 | + * |
|
264 | + * @param bool $autoCommit True to enable auto-commit mode; false to disable it. |
|
265 | + * |
|
266 | + * @return void |
|
267 | + */ |
|
268 | + public function setAutoCommit($autoCommit) |
|
269 | + { |
|
270 | + } |
|
271 | + |
|
272 | + /** |
|
273 | + * Prepares and executes an SQL query and returns the first row of the result |
|
274 | + * as an associative array. |
|
275 | + * |
|
276 | + * @param string $query SQL query |
|
277 | + * @param list<mixed>|array<string, mixed> $params Query parameters |
|
278 | + * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
279 | + * |
|
280 | + * @return array<string, mixed>|false False is returned if no rows are found. |
|
281 | + * |
|
282 | + * @throws Exception |
|
283 | + */ |
|
284 | + public function fetchAssociative(string $query, array $params = [], array $types = []) |
|
285 | + { |
|
286 | + } |
|
287 | + |
|
288 | + /** |
|
289 | + * Prepares and executes an SQL query and returns the first row of the result |
|
290 | + * as a numerically indexed array. |
|
291 | + * |
|
292 | + * @param string $query SQL query |
|
293 | + * @param list<mixed>|array<string, mixed> $params Query parameters |
|
294 | + * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
295 | + * |
|
296 | + * @return list<mixed>|false False is returned if no rows are found. |
|
297 | + * |
|
298 | + * @throws Exception |
|
299 | + */ |
|
300 | + public function fetchNumeric(string $query, array $params = [], array $types = []) |
|
301 | + { |
|
302 | + } |
|
303 | + |
|
304 | + /** |
|
305 | + * Prepares and executes an SQL query and returns the value of a single column |
|
306 | + * of the first row of the result. |
|
307 | + * |
|
308 | + * @param string $query SQL query |
|
309 | + * @param list<mixed>|array<string, mixed> $params Query parameters |
|
310 | + * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
311 | + * |
|
312 | + * @return mixed|false False is returned if no rows are found. |
|
313 | + * |
|
314 | + * @throws Exception |
|
315 | + */ |
|
316 | + public function fetchOne(string $query, array $params = [], array $types = []) |
|
317 | + { |
|
318 | + } |
|
319 | + |
|
320 | + /** |
|
321 | + * Whether an actual connection to the database is established. |
|
322 | + * |
|
323 | + * @return bool |
|
324 | + */ |
|
325 | + public function isConnected() |
|
326 | + { |
|
327 | + } |
|
328 | + |
|
329 | + /** |
|
330 | + * Checks whether a transaction is currently active. |
|
331 | + * |
|
332 | + * @return bool TRUE if a transaction is currently active, FALSE otherwise. |
|
333 | + */ |
|
334 | + public function isTransactionActive() |
|
335 | + { |
|
336 | + } |
|
337 | + |
|
338 | + /** |
|
339 | + * Executes an SQL DELETE statement on a table. |
|
340 | + * |
|
341 | + * Table expression and columns are not escaped and are not safe for user-input. |
|
342 | + * |
|
343 | + * @param string $table Table name |
|
344 | + * @param array<string, mixed> $criteria Deletion criteria |
|
345 | + * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
346 | + * |
|
347 | + * @return int|string The number of affected rows. |
|
348 | + * |
|
349 | + * @throws Exception |
|
350 | + */ |
|
351 | + public function delete($table, array $criteria, array $types = []) |
|
352 | + { |
|
353 | + } |
|
354 | + |
|
355 | + /** |
|
356 | + * Closes the connection. |
|
357 | + * |
|
358 | + * @return void |
|
359 | + */ |
|
360 | + public function close() |
|
361 | + { |
|
362 | + } |
|
363 | + |
|
364 | + /** |
|
365 | + * Sets the transaction isolation level. |
|
366 | + * |
|
367 | + * @param TransactionIsolationLevel::* $level The level to set. |
|
368 | + * |
|
369 | + * @return int|string |
|
370 | + * |
|
371 | + * @throws Exception |
|
372 | + */ |
|
373 | + public function setTransactionIsolation($level) |
|
374 | + { |
|
375 | + } |
|
376 | + |
|
377 | + /** |
|
378 | + * Gets the currently active transaction isolation level. |
|
379 | + * |
|
380 | + * @return TransactionIsolationLevel::* The current transaction isolation level. |
|
381 | + * |
|
382 | + * @throws Exception |
|
383 | + */ |
|
384 | + public function getTransactionIsolation() |
|
385 | + { |
|
386 | + } |
|
387 | + |
|
388 | + /** |
|
389 | + * Executes an SQL UPDATE statement on a table. |
|
390 | + * |
|
391 | + * Table expression and columns are not escaped and are not safe for user-input. |
|
392 | + * |
|
393 | + * @param string $table Table name |
|
394 | + * @param array<string, mixed> $data Column-value pairs |
|
395 | + * @param array<string, mixed> $criteria Update criteria |
|
396 | + * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
397 | + * |
|
398 | + * @return int|string The number of affected rows. |
|
399 | + * |
|
400 | + * @throws Exception |
|
401 | + */ |
|
402 | + public function update($table, array $data, array $criteria, array $types = []) |
|
403 | + { |
|
404 | + } |
|
405 | + |
|
406 | + /** |
|
407 | + * Inserts a table row with specified data. |
|
408 | + * |
|
409 | + * Table expression and columns are not escaped and are not safe for user-input. |
|
410 | + * |
|
411 | + * @param string $table Table name |
|
412 | + * @param array<string, mixed> $data Column-value pairs |
|
413 | + * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
414 | + * |
|
415 | + * @return int|string The number of affected rows. |
|
416 | + * |
|
417 | + * @throws Exception |
|
418 | + */ |
|
419 | + public function insert($table, array $data, array $types = []) |
|
420 | + { |
|
421 | + } |
|
422 | + |
|
423 | + /** |
|
424 | + * Quotes a string so it can be safely used as a table or column name, even if |
|
425 | + * it is a reserved name. |
|
426 | + * |
|
427 | + * Delimiting style depends on the underlying database platform that is being used. |
|
428 | + * |
|
429 | + * NOTE: Just because you CAN use quoted identifiers does not mean |
|
430 | + * you SHOULD use them. In general, they end up causing way more |
|
431 | + * problems than they solve. |
|
432 | + * |
|
433 | + * @param string $str The name to be quoted. |
|
434 | + * |
|
435 | + * @return string The quoted name. |
|
436 | + */ |
|
437 | + public function quoteIdentifier($str) |
|
438 | + { |
|
439 | + } |
|
440 | + |
|
441 | + /** |
|
442 | + * The usage of this method is discouraged. Use prepared statements |
|
443 | + * or {@see AbstractPlatform::quoteStringLiteral()} instead. |
|
444 | + * |
|
445 | + * @param mixed $value |
|
446 | + * @param int|string|Type|null $type |
|
447 | + * |
|
448 | + * @return mixed |
|
449 | + */ |
|
450 | + public function quote($value, $type = ParameterType::STRING) |
|
451 | + { |
|
452 | + } |
|
453 | + |
|
454 | + /** |
|
455 | + * Prepares and executes an SQL query and returns the result as an array of numeric arrays. |
|
456 | + * |
|
457 | + * @param string $query SQL query |
|
458 | + * @param list<mixed>|array<string, mixed> $params Query parameters |
|
459 | + * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
460 | + * |
|
461 | + * @return list<list<mixed>> |
|
462 | + * |
|
463 | + * @throws Exception |
|
464 | + */ |
|
465 | + public function fetchAllNumeric(string $query, array $params = [], array $types = []): array |
|
466 | + { |
|
467 | + } |
|
468 | + |
|
469 | + /** |
|
470 | + * Prepares and executes an SQL query and returns the result as an array of associative arrays. |
|
471 | + * |
|
472 | + * @param string $query SQL query |
|
473 | + * @param list<mixed>|array<string, mixed> $params Query parameters |
|
474 | + * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
475 | + * |
|
476 | + * @return list<array<string,mixed>> |
|
477 | + * |
|
478 | + * @throws Exception |
|
479 | + */ |
|
480 | + public function fetchAllAssociative(string $query, array $params = [], array $types = []): array |
|
481 | + { |
|
482 | + } |
|
483 | + |
|
484 | + /** |
|
485 | + * Prepares and executes an SQL query and returns the result as an associative array with the keys |
|
486 | + * mapped to the first column and the values mapped to the second column. |
|
487 | + * |
|
488 | + * @param string $query SQL query |
|
489 | + * @param list<mixed>|array<string, mixed> $params Query parameters |
|
490 | + * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
491 | + * |
|
492 | + * @return array<mixed,mixed> |
|
493 | + * |
|
494 | + * @throws Exception |
|
495 | + */ |
|
496 | + public function fetchAllKeyValue(string $query, array $params = [], array $types = []): array |
|
497 | + { |
|
498 | + } |
|
499 | + |
|
500 | + /** |
|
501 | + * Prepares and executes an SQL query and returns the result as an associative array with the keys mapped |
|
502 | + * to the first column and the values being an associative array representing the rest of the columns |
|
503 | + * and their values. |
|
504 | + * |
|
505 | + * @param string $query SQL query |
|
506 | + * @param list<mixed>|array<string, mixed> $params Query parameters |
|
507 | + * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
508 | + * |
|
509 | + * @return array<mixed,array<string,mixed>> |
|
510 | + * |
|
511 | + * @throws Exception |
|
512 | + */ |
|
513 | + public function fetchAllAssociativeIndexed(string $query, array $params = [], array $types = []): array |
|
514 | + { |
|
515 | + } |
|
516 | + |
|
517 | + /** |
|
518 | + * Prepares and executes an SQL query and returns the result as an array of the first column values. |
|
519 | + * |
|
520 | + * @param string $query SQL query |
|
521 | + * @param list<mixed>|array<string, mixed> $params Query parameters |
|
522 | + * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
523 | + * |
|
524 | + * @return list<mixed> |
|
525 | + * |
|
526 | + * @throws Exception |
|
527 | + */ |
|
528 | + public function fetchFirstColumn(string $query, array $params = [], array $types = []): array |
|
529 | + { |
|
530 | + } |
|
531 | + |
|
532 | + /** |
|
533 | + * Prepares and executes an SQL query and returns the result as an iterator over rows represented as numeric arrays. |
|
534 | + * |
|
535 | + * @param string $query SQL query |
|
536 | + * @param list<mixed>|array<string, mixed> $params Query parameters |
|
537 | + * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
538 | + * |
|
539 | + * @return Traversable<int,list<mixed>> |
|
540 | + * |
|
541 | + * @throws Exception |
|
542 | + */ |
|
543 | + public function iterateNumeric(string $query, array $params = [], array $types = []): Traversable |
|
544 | + { |
|
545 | + } |
|
546 | + |
|
547 | + /** |
|
548 | + * Prepares and executes an SQL query and returns the result as an iterator over rows represented |
|
549 | + * as associative arrays. |
|
550 | + * |
|
551 | + * @param string $query SQL query |
|
552 | + * @param list<mixed>|array<string, mixed> $params Query parameters |
|
553 | + * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
554 | + * |
|
555 | + * @return Traversable<int,array<string,mixed>> |
|
556 | + * |
|
557 | + * @throws Exception |
|
558 | + */ |
|
559 | + public function iterateAssociative(string $query, array $params = [], array $types = []): Traversable |
|
560 | + { |
|
561 | + } |
|
562 | + |
|
563 | + /** |
|
564 | + * Prepares and executes an SQL query and returns the result as an iterator with the keys |
|
565 | + * mapped to the first column and the values mapped to the second column. |
|
566 | + * |
|
567 | + * @param string $query SQL query |
|
568 | + * @param list<mixed>|array<string, mixed> $params Query parameters |
|
569 | + * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
570 | + * |
|
571 | + * @return Traversable<mixed,mixed> |
|
572 | + * |
|
573 | + * @throws Exception |
|
574 | + */ |
|
575 | + public function iterateKeyValue(string $query, array $params = [], array $types = []): Traversable |
|
576 | + { |
|
577 | + } |
|
578 | + |
|
579 | + /** |
|
580 | + * Prepares and executes an SQL query and returns the result as an iterator with the keys mapped |
|
581 | + * to the first column and the values being an associative array representing the rest of the columns |
|
582 | + * and their values. |
|
583 | + * |
|
584 | + * @param string $query SQL query |
|
585 | + * @param list<mixed>|array<string, mixed> $params Query parameters |
|
586 | + * @param array<int, int|string>|array<string, int|string> $types Parameter types |
|
587 | + * |
|
588 | + * @return Traversable<mixed,array<string,mixed>> |
|
589 | + * |
|
590 | + * @throws Exception |
|
591 | + */ |
|
592 | + public function iterateAssociativeIndexed(string $query, array $params = [], array $types = []): Traversable |
|
593 | + { |
|
594 | + } |
|
595 | + |
|
596 | + /** |
|
597 | + * Prepares and executes an SQL query and returns the result as an iterator over the first column values. |
|
598 | + * |
|
599 | + * @param string $query SQL query |
|
600 | + * @param list<mixed>|array<string, mixed> $params Query parameters |
|
601 | + * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
602 | + * |
|
603 | + * @return Traversable<int,mixed> |
|
604 | + * |
|
605 | + * @throws Exception |
|
606 | + */ |
|
607 | + public function iterateColumn(string $query, array $params = [], array $types = []): Traversable |
|
608 | + { |
|
609 | + } |
|
610 | + |
|
611 | + /** |
|
612 | + * Prepares an SQL statement. |
|
613 | + * |
|
614 | + * @param string $sql The SQL statement to prepare. |
|
615 | + * |
|
616 | + * @throws Exception |
|
617 | + */ |
|
618 | + public function prepare(string $sql): Statement |
|
619 | + { |
|
620 | + } |
|
621 | + |
|
622 | + /** |
|
623 | + * Executes an, optionally parameterized, SQL query. |
|
624 | + * |
|
625 | + * If the query is parametrized, a prepared statement is used. |
|
626 | + * If an SQLLogger is configured, the execution is logged. |
|
627 | + * |
|
628 | + * @param string $sql SQL query |
|
629 | + * @param list<mixed>|array<string, mixed> $params Query parameters |
|
630 | + * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
631 | + * |
|
632 | + * @throws Exception |
|
633 | + */ |
|
634 | + public function executeQuery(string $sql, array $params = [], $types = [], ?QueryCacheProfile $qcp = null): Result |
|
635 | + { |
|
636 | + } |
|
637 | + |
|
638 | + /** |
|
639 | + * Executes a caching query. |
|
640 | + * |
|
641 | + * @param string $sql SQL query |
|
642 | + * @param list<mixed>|array<string, mixed> $params Query parameters |
|
643 | + * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
644 | + * |
|
645 | + * @throws CacheException |
|
646 | + * @throws Exception |
|
647 | + */ |
|
648 | + public function executeCacheQuery($sql, $params, $types, QueryCacheProfile $qcp): Result |
|
649 | + { |
|
650 | + } |
|
651 | + |
|
652 | + /** |
|
653 | + * Executes an SQL statement with the given parameters and returns the number of affected rows. |
|
654 | + * |
|
655 | + * Could be used for: |
|
656 | + * - DML statements: INSERT, UPDATE, DELETE, etc. |
|
657 | + * - DDL statements: CREATE, DROP, ALTER, etc. |
|
658 | + * - DCL statements: GRANT, REVOKE, etc. |
|
659 | + * - Session control statements: ALTER SESSION, SET, DECLARE, etc. |
|
660 | + * - Other statements that don't yield a row set. |
|
661 | + * |
|
662 | + * This method supports PDO binding types as well as DBAL mapping types. |
|
663 | + * |
|
664 | + * @param string $sql SQL statement |
|
665 | + * @param list<mixed>|array<string, mixed> $params Statement parameters |
|
666 | + * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types Parameter types |
|
667 | + * |
|
668 | + * @return int|string The number of affected rows. |
|
669 | + * |
|
670 | + * @throws Exception |
|
671 | + */ |
|
672 | + public function executeStatement($sql, array $params = [], array $types = []) |
|
673 | + { |
|
674 | + } |
|
675 | + |
|
676 | + /** |
|
677 | + * Returns the current transaction nesting level. |
|
678 | + * |
|
679 | + * @return int The nesting level. A value of 0 means there's no active transaction. |
|
680 | + */ |
|
681 | + public function getTransactionNestingLevel() |
|
682 | + { |
|
683 | + } |
|
684 | + |
|
685 | + /** |
|
686 | + * Returns the ID of the last inserted row, or the last value from a sequence object, |
|
687 | + * depending on the underlying driver. |
|
688 | + * |
|
689 | + * Note: This method may not return a meaningful or consistent result across different drivers, |
|
690 | + * because the underlying database may not even support the notion of AUTO_INCREMENT/IDENTITY |
|
691 | + * columns or sequences. |
|
692 | + * |
|
693 | + * @param string|null $name Name of the sequence object from which the ID should be returned. |
|
694 | + * |
|
695 | + * @return string|int|false A string representation of the last inserted ID. |
|
696 | + * |
|
697 | + * @throws Exception |
|
698 | + */ |
|
699 | + public function lastInsertId($name = null) |
|
700 | + { |
|
701 | + } |
|
702 | + |
|
703 | + /** |
|
704 | + * Executes a function in a transaction. |
|
705 | + * |
|
706 | + * The function gets passed this Connection instance as an (optional) parameter. |
|
707 | + * |
|
708 | + * If an exception occurs during execution of the function or transaction commit, |
|
709 | + * the transaction is rolled back and the exception re-thrown. |
|
710 | + * |
|
711 | + * @param Closure(self):T $func The function to execute transactionally. |
|
712 | + * |
|
713 | + * @return T The value returned by $func |
|
714 | + * |
|
715 | + * @throws Throwable |
|
716 | + * |
|
717 | + * @template T |
|
718 | + */ |
|
719 | + public function transactional(Closure $func) |
|
720 | + { |
|
721 | + } |
|
722 | + |
|
723 | + /** |
|
724 | + * Sets if nested transactions should use savepoints. |
|
725 | + * |
|
726 | + * @param bool $nestTransactionsWithSavepoints |
|
727 | + * |
|
728 | + * @return void |
|
729 | + * |
|
730 | + * @throws Exception |
|
731 | + */ |
|
732 | + public function setNestTransactionsWithSavepoints($nestTransactionsWithSavepoints) |
|
733 | + { |
|
734 | + } |
|
735 | + |
|
736 | + /** |
|
737 | + * Gets if nested transactions should use savepoints. |
|
738 | + * |
|
739 | + * @return bool |
|
740 | + */ |
|
741 | + public function getNestTransactionsWithSavepoints() |
|
742 | + { |
|
743 | + } |
|
744 | + |
|
745 | + /** |
|
746 | + * Returns the savepoint name to use for nested transactions. |
|
747 | + * |
|
748 | + * @return string |
|
749 | + */ |
|
750 | + protected function _getNestedTransactionSavePointName() |
|
751 | + { |
|
752 | + } |
|
753 | + |
|
754 | + /** |
|
755 | + * @return bool |
|
756 | + * |
|
757 | + * @throws Exception |
|
758 | + */ |
|
759 | + public function beginTransaction() |
|
760 | + { |
|
761 | + } |
|
762 | + |
|
763 | + /** |
|
764 | + * @return bool |
|
765 | + * |
|
766 | + * @throws Exception |
|
767 | + */ |
|
768 | + public function commit() |
|
769 | + { |
|
770 | + } |
|
771 | + |
|
772 | + /** |
|
773 | + * Cancels any database changes done during the current transaction. |
|
774 | + * |
|
775 | + * @return bool |
|
776 | + * |
|
777 | + * @throws Exception |
|
778 | + */ |
|
779 | + public function rollBack() |
|
780 | + { |
|
781 | + } |
|
782 | + |
|
783 | + /** |
|
784 | + * Creates a new savepoint. |
|
785 | + * |
|
786 | + * @param string $savepoint The name of the savepoint to create. |
|
787 | + * |
|
788 | + * @return void |
|
789 | + * |
|
790 | + * @throws Exception |
|
791 | + */ |
|
792 | + public function createSavepoint($savepoint) |
|
793 | + { |
|
794 | + } |
|
795 | + |
|
796 | + /** |
|
797 | + * Releases the given savepoint. |
|
798 | + * |
|
799 | + * @param string $savepoint The name of the savepoint to release. |
|
800 | + * |
|
801 | + * @return void |
|
802 | + * |
|
803 | + * @throws Exception |
|
804 | + */ |
|
805 | + public function releaseSavepoint($savepoint) |
|
806 | + { |
|
807 | + } |
|
808 | + |
|
809 | + /** |
|
810 | + * Rolls back to the given savepoint. |
|
811 | + * |
|
812 | + * @param string $savepoint The name of the savepoint to rollback to. |
|
813 | + * |
|
814 | + * @return void |
|
815 | + * |
|
816 | + * @throws Exception |
|
817 | + */ |
|
818 | + public function rollbackSavepoint($savepoint) |
|
819 | + { |
|
820 | + } |
|
821 | + |
|
822 | + /** |
|
823 | + * Gets the wrapped driver connection. |
|
824 | + * |
|
825 | + * @deprecated Use {@link getNativeConnection()} to access the native connection. |
|
826 | + * |
|
827 | + * @return DriverConnection |
|
828 | + * |
|
829 | + * @throws Exception |
|
830 | + */ |
|
831 | + public function getWrappedConnection() |
|
832 | + { |
|
833 | + } |
|
834 | + |
|
835 | + /** @return resource|object */ |
|
836 | + public function getNativeConnection() |
|
837 | + { |
|
838 | + } |
|
839 | + |
|
840 | + /** |
|
841 | + * Creates a SchemaManager that can be used to inspect or change the |
|
842 | + * database schema through the connection. |
|
843 | + * |
|
844 | + * @throws Exception |
|
845 | + */ |
|
846 | + public function createSchemaManager(): AbstractSchemaManager |
|
847 | + { |
|
848 | + } |
|
849 | + |
|
850 | + /** |
|
851 | + * Gets the SchemaManager that can be used to inspect or change the |
|
852 | + * database schema through the connection. |
|
853 | + * |
|
854 | + * @deprecated Use {@see createSchemaManager()} instead. |
|
855 | + * |
|
856 | + * @return AbstractSchemaManager |
|
857 | + * |
|
858 | + * @throws Exception |
|
859 | + */ |
|
860 | + public function getSchemaManager() |
|
861 | + { |
|
862 | + } |
|
863 | + |
|
864 | + /** |
|
865 | + * Marks the current transaction so that the only possible |
|
866 | + * outcome for the transaction to be rolled back. |
|
867 | + * |
|
868 | + * @return void |
|
869 | + * |
|
870 | + * @throws ConnectionException If no transaction is active. |
|
871 | + */ |
|
872 | + public function setRollbackOnly() |
|
873 | + { |
|
874 | + } |
|
875 | + |
|
876 | + /** |
|
877 | + * Checks whether the current transaction is marked for rollback only. |
|
878 | + * |
|
879 | + * @return bool |
|
880 | + * |
|
881 | + * @throws ConnectionException If no transaction is active. |
|
882 | + */ |
|
883 | + public function isRollbackOnly() |
|
884 | + { |
|
885 | + } |
|
886 | + |
|
887 | + /** |
|
888 | + * Converts a given value to its database representation according to the conversion |
|
889 | + * rules of a specific DBAL mapping type. |
|
890 | + * |
|
891 | + * @param mixed $value The value to convert. |
|
892 | + * @param string $type The name of the DBAL mapping type. |
|
893 | + * |
|
894 | + * @return mixed The converted value. |
|
895 | + * |
|
896 | + * @throws Exception |
|
897 | + */ |
|
898 | + public function convertToDatabaseValue($value, $type) |
|
899 | + { |
|
900 | + } |
|
901 | + |
|
902 | + /** |
|
903 | + * Converts a given value to its PHP representation according to the conversion |
|
904 | + * rules of a specific DBAL mapping type. |
|
905 | + * |
|
906 | + * @param mixed $value The value to convert. |
|
907 | + * @param string $type The name of the DBAL mapping type. |
|
908 | + * |
|
909 | + * @return mixed The converted type. |
|
910 | + * |
|
911 | + * @throws Exception |
|
912 | + */ |
|
913 | + public function convertToPHPValue($value, $type) |
|
914 | + { |
|
915 | + } |
|
916 | + |
|
917 | + /** |
|
918 | + * Creates a new instance of a SQL query builder. |
|
919 | + * |
|
920 | + * @return QueryBuilder |
|
921 | + */ |
|
922 | + public function createQueryBuilder() |
|
923 | + { |
|
924 | + } |
|
925 | + |
|
926 | + /** |
|
927 | + * @internal |
|
928 | + * |
|
929 | + * @param list<mixed>|array<string, mixed> $params |
|
930 | + * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types |
|
931 | + */ |
|
932 | + final public function convertExceptionDuringQuery(Driver\Exception $e, string $sql, array $params = [], array $types = []): DriverException |
|
933 | + { |
|
934 | + } |
|
935 | + |
|
936 | + /** @internal */ |
|
937 | + final public function convertException(Driver\Exception $e): DriverException |
|
938 | + { |
|
939 | + } |
|
940 | + |
|
941 | + /** |
|
942 | + * BC layer for a wide-spread use-case of old DBAL APIs |
|
943 | + * |
|
944 | + * @deprecated Use {@see executeStatement()} instead |
|
945 | + * |
|
946 | + * @param array<mixed> $params The query parameters |
|
947 | + * @param array<int|string|null> $types The parameter types |
|
948 | + */ |
|
949 | + public function executeUpdate(string $sql, array $params = [], array $types = []): int |
|
950 | + { |
|
951 | + } |
|
952 | + |
|
953 | + /** |
|
954 | + * BC layer for a wide-spread use-case of old DBAL APIs |
|
955 | + * |
|
956 | + * @deprecated Use {@see executeQuery()} instead |
|
957 | + */ |
|
958 | + public function query(string $sql): Result |
|
959 | + { |
|
960 | + } |
|
961 | + |
|
962 | + /** |
|
963 | + * BC layer for a wide-spread use-case of old DBAL APIs |
|
964 | + * |
|
965 | + * @deprecated please use {@see executeStatement()} instead |
|
966 | + */ |
|
967 | + public function exec(string $sql): int |
|
968 | + { |
|
969 | + } |
|
970 | 970 | } |
@@ -18,12 +18,12 @@ |
||
18 | 18 | */ |
19 | 19 | class ConfirmationQuestion extends Question |
20 | 20 | { |
21 | - /** |
|
22 | - * @param string $question The question to ask to the user |
|
23 | - * @param bool $default The default answer to return, true or false |
|
24 | - * @param string $trueAnswerRegex A regex to match the "yes" answer |
|
25 | - */ |
|
26 | - public function __construct(string $question, bool $default = true, string $trueAnswerRegex = '/^y/i') |
|
27 | - { |
|
28 | - } |
|
21 | + /** |
|
22 | + * @param string $question The question to ask to the user |
|
23 | + * @param bool $default The default answer to return, true or false |
|
24 | + * @param string $trueAnswerRegex A regex to match the "yes" answer |
|
25 | + */ |
|
26 | + public function __construct(string $question, bool $default = true, string $trueAnswerRegex = '/^y/i') |
|
27 | + { |
|
28 | + } |
|
29 | 29 | } |
@@ -64,10 +64,10 @@ |
||
64 | 64 | protected IFilesMetadataManager $metadataManager; |
65 | 65 | |
66 | 66 | public function __construct( |
67 | - private IStorage $storage, |
|
68 | - // this constructor is used in to many pleases to easily do proper di |
|
69 | - // so instead we group it all together |
|
70 | - ?CacheDependencies $dependencies = null |
|
67 | + private IStorage $storage, |
|
68 | + // this constructor is used in to many pleases to easily do proper di |
|
69 | + // so instead we group it all together |
|
70 | + ?CacheDependencies $dependencies = null |
|
71 | 71 | ) |
72 | 72 | { |
73 | 73 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | { |
62 | 62 | } |
63 | 63 | |
64 | - public function getShare(int $id, ?string $user = null): array|false |
|
64 | + public function getShare(int $id, ?string $user = null): array | false |
|
65 | 65 | { |
66 | 66 | } |
67 | 67 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | * @param string $token |
72 | 72 | * @return array|false |
73 | 73 | */ |
74 | - public function getShareByToken(string $token): array|false |
|
74 | + public function getShareByToken(string $token): array | false |
|
75 | 75 | { |
76 | 76 | } |
77 | 77 |
@@ -16,65 +16,65 @@ |
||
16 | 16 | /** @psalm-immutable */ |
17 | 17 | class Exception extends \Exception |
18 | 18 | { |
19 | - public static function notSupported(string $method): self |
|
20 | - { |
|
21 | - } |
|
22 | - |
|
23 | - /** @param mixed $invalidPlatform */ |
|
24 | - public static function invalidPlatformType($invalidPlatform): self |
|
25 | - { |
|
26 | - } |
|
27 | - |
|
28 | - /** |
|
29 | - * Returns a new instance for an invalid specified platform version. |
|
30 | - * |
|
31 | - * @param string $version The invalid platform version given. |
|
32 | - * @param string $expectedFormat The expected platform version format. |
|
33 | - */ |
|
34 | - public static function invalidPlatformVersionSpecified(string $version, string $expectedFormat): self |
|
35 | - { |
|
36 | - } |
|
37 | - |
|
38 | - /** @param string|null $url The URL that was provided in the connection parameters (if any). */ |
|
39 | - public static function driverRequired(#[SensitiveParameter] |
|
40 | - ?string $url = null): self |
|
41 | - { |
|
42 | - } |
|
43 | - |
|
44 | - /** @param string[] $knownDrivers */ |
|
45 | - public static function unknownDriver(string $unknownDriverName, array $knownDrivers): self |
|
46 | - { |
|
47 | - } |
|
48 | - |
|
49 | - public static function invalidWrapperClass(string $wrapperClass): self |
|
50 | - { |
|
51 | - } |
|
52 | - |
|
53 | - public static function invalidDriverClass(string $driverClass): self |
|
54 | - { |
|
55 | - } |
|
56 | - |
|
57 | - public static function noColumnsSpecifiedForTable(string $tableName): self |
|
58 | - { |
|
59 | - } |
|
60 | - |
|
61 | - public static function typeExists(string $name): self |
|
62 | - { |
|
63 | - } |
|
64 | - |
|
65 | - public static function unknownColumnType(string $name): self |
|
66 | - { |
|
67 | - } |
|
68 | - |
|
69 | - public static function typeNotFound(string $name): self |
|
70 | - { |
|
71 | - } |
|
72 | - |
|
73 | - public static function typeNotRegistered(Type $type): self |
|
74 | - { |
|
75 | - } |
|
76 | - |
|
77 | - public static function typeAlreadyRegistered(Type $type): self |
|
78 | - { |
|
79 | - } |
|
19 | + public static function notSupported(string $method): self |
|
20 | + { |
|
21 | + } |
|
22 | + |
|
23 | + /** @param mixed $invalidPlatform */ |
|
24 | + public static function invalidPlatformType($invalidPlatform): self |
|
25 | + { |
|
26 | + } |
|
27 | + |
|
28 | + /** |
|
29 | + * Returns a new instance for an invalid specified platform version. |
|
30 | + * |
|
31 | + * @param string $version The invalid platform version given. |
|
32 | + * @param string $expectedFormat The expected platform version format. |
|
33 | + */ |
|
34 | + public static function invalidPlatformVersionSpecified(string $version, string $expectedFormat): self |
|
35 | + { |
|
36 | + } |
|
37 | + |
|
38 | + /** @param string|null $url The URL that was provided in the connection parameters (if any). */ |
|
39 | + public static function driverRequired(#[SensitiveParameter] |
|
40 | + ?string $url = null): self |
|
41 | + { |
|
42 | + } |
|
43 | + |
|
44 | + /** @param string[] $knownDrivers */ |
|
45 | + public static function unknownDriver(string $unknownDriverName, array $knownDrivers): self |
|
46 | + { |
|
47 | + } |
|
48 | + |
|
49 | + public static function invalidWrapperClass(string $wrapperClass): self |
|
50 | + { |
|
51 | + } |
|
52 | + |
|
53 | + public static function invalidDriverClass(string $driverClass): self |
|
54 | + { |
|
55 | + } |
|
56 | + |
|
57 | + public static function noColumnsSpecifiedForTable(string $tableName): self |
|
58 | + { |
|
59 | + } |
|
60 | + |
|
61 | + public static function typeExists(string $name): self |
|
62 | + { |
|
63 | + } |
|
64 | + |
|
65 | + public static function unknownColumnType(string $name): self |
|
66 | + { |
|
67 | + } |
|
68 | + |
|
69 | + public static function typeNotFound(string $name): self |
|
70 | + { |
|
71 | + } |
|
72 | + |
|
73 | + public static function typeNotRegistered(Type $type): self |
|
74 | + { |
|
75 | + } |
|
76 | + |
|
77 | + public static function typeAlreadyRegistered(Type $type): self |
|
78 | + { |
|
79 | + } |
|
80 | 80 | } |
@@ -15,195 +15,195 @@ |
||
15 | 15 | |
16 | 16 | class Index extends AbstractAsset implements Constraint |
17 | 17 | { |
18 | - /** |
|
19 | - * Asset identifier instances of the column names the index is associated with. |
|
20 | - * array($columnName => Identifier) |
|
21 | - * |
|
22 | - * @var Identifier[] |
|
23 | - */ |
|
24 | - protected $_columns = []; |
|
25 | - |
|
26 | - /** @var bool */ |
|
27 | - protected $_isUnique = false; |
|
28 | - |
|
29 | - /** @var bool */ |
|
30 | - protected $_isPrimary = false; |
|
31 | - |
|
32 | - /** |
|
33 | - * Platform specific flags for indexes. |
|
34 | - * array($flagName => true) |
|
35 | - * |
|
36 | - * @var true[] |
|
37 | - */ |
|
38 | - protected $_flags = []; |
|
39 | - |
|
40 | - /** |
|
41 | - * @param string $name |
|
42 | - * @param string[] $columns |
|
43 | - * @param bool $isUnique |
|
44 | - * @param bool $isPrimary |
|
45 | - * @param string[] $flags |
|
46 | - * @param mixed[] $options |
|
47 | - */ |
|
48 | - public function __construct($name, array $columns, $isUnique = false, $isPrimary = false, array $flags = [], array $options = []) |
|
49 | - { |
|
50 | - } |
|
51 | - |
|
52 | - /** @throws InvalidArgumentException */ |
|
53 | - protected function _addColumn(string $column): void |
|
54 | - { |
|
55 | - } |
|
56 | - |
|
57 | - /** |
|
58 | - * {@inheritDoc} |
|
59 | - */ |
|
60 | - public function getColumns() |
|
61 | - { |
|
62 | - } |
|
63 | - |
|
64 | - /** |
|
65 | - * {@inheritDoc} |
|
66 | - */ |
|
67 | - public function getQuotedColumns(AbstractPlatform $platform) |
|
68 | - { |
|
69 | - } |
|
70 | - |
|
71 | - /** @return string[] */ |
|
72 | - public function getUnquotedColumns() |
|
73 | - { |
|
74 | - } |
|
75 | - |
|
76 | - /** |
|
77 | - * Is the index neither unique nor primary key? |
|
78 | - * |
|
79 | - * @return bool |
|
80 | - */ |
|
81 | - public function isSimpleIndex() |
|
82 | - { |
|
83 | - } |
|
84 | - |
|
85 | - /** @return bool */ |
|
86 | - public function isUnique() |
|
87 | - { |
|
88 | - } |
|
89 | - |
|
90 | - /** @return bool */ |
|
91 | - public function isPrimary() |
|
92 | - { |
|
93 | - } |
|
94 | - |
|
95 | - /** |
|
96 | - * @param string $name |
|
97 | - * @param int $pos |
|
98 | - * |
|
99 | - * @return bool |
|
100 | - */ |
|
101 | - public function hasColumnAtPosition($name, $pos = 0) |
|
102 | - { |
|
103 | - } |
|
104 | - |
|
105 | - /** |
|
106 | - * Checks if this index exactly spans the given column names in the correct order. |
|
107 | - * |
|
108 | - * @param string[] $columnNames |
|
109 | - * |
|
110 | - * @return bool |
|
111 | - */ |
|
112 | - public function spansColumns(array $columnNames) |
|
113 | - { |
|
114 | - } |
|
115 | - |
|
116 | - /** |
|
117 | - * Keeping misspelled function name for backwards compatibility |
|
118 | - * |
|
119 | - * @deprecated Use {@see isFulfilledBy()} instead. |
|
120 | - * |
|
121 | - * @return bool |
|
122 | - */ |
|
123 | - public function isFullfilledBy(Index $other) |
|
124 | - { |
|
125 | - } |
|
126 | - |
|
127 | - /** |
|
128 | - * Checks if the other index already fulfills all the indexing and constraint needs of the current one. |
|
129 | - */ |
|
130 | - public function isFulfilledBy(Index $other): bool |
|
131 | - { |
|
132 | - } |
|
133 | - |
|
134 | - /** |
|
135 | - * Detects if the other index is a non-unique, non primary index that can be overwritten by this one. |
|
136 | - * |
|
137 | - * @return bool |
|
138 | - */ |
|
139 | - public function overrules(Index $other) |
|
140 | - { |
|
141 | - } |
|
142 | - |
|
143 | - /** |
|
144 | - * Returns platform specific flags for indexes. |
|
145 | - * |
|
146 | - * @return string[] |
|
147 | - */ |
|
148 | - public function getFlags() |
|
149 | - { |
|
150 | - } |
|
151 | - |
|
152 | - /** |
|
153 | - * Adds Flag for an index that translates to platform specific handling. |
|
154 | - * |
|
155 | - * @param string $flag |
|
156 | - * |
|
157 | - * @return Index |
|
158 | - * |
|
159 | - * @example $index->addFlag('CLUSTERED') |
|
160 | - */ |
|
161 | - public function addFlag($flag) |
|
162 | - { |
|
163 | - } |
|
164 | - |
|
165 | - /** |
|
166 | - * Does this index have a specific flag? |
|
167 | - * |
|
168 | - * @param string $flag |
|
169 | - * |
|
170 | - * @return bool |
|
171 | - */ |
|
172 | - public function hasFlag($flag) |
|
173 | - { |
|
174 | - } |
|
175 | - |
|
176 | - /** |
|
177 | - * Removes a flag. |
|
178 | - * |
|
179 | - * @param string $flag |
|
180 | - * |
|
181 | - * @return void |
|
182 | - */ |
|
183 | - public function removeFlag($flag) |
|
184 | - { |
|
185 | - } |
|
186 | - |
|
187 | - /** |
|
188 | - * @param string $name |
|
189 | - * |
|
190 | - * @return bool |
|
191 | - */ |
|
192 | - public function hasOption($name) |
|
193 | - { |
|
194 | - } |
|
195 | - |
|
196 | - /** |
|
197 | - * @param string $name |
|
198 | - * |
|
199 | - * @return mixed |
|
200 | - */ |
|
201 | - public function getOption($name) |
|
202 | - { |
|
203 | - } |
|
204 | - |
|
205 | - /** @return mixed[] */ |
|
206 | - public function getOptions() |
|
207 | - { |
|
208 | - } |
|
18 | + /** |
|
19 | + * Asset identifier instances of the column names the index is associated with. |
|
20 | + * array($columnName => Identifier) |
|
21 | + * |
|
22 | + * @var Identifier[] |
|
23 | + */ |
|
24 | + protected $_columns = []; |
|
25 | + |
|
26 | + /** @var bool */ |
|
27 | + protected $_isUnique = false; |
|
28 | + |
|
29 | + /** @var bool */ |
|
30 | + protected $_isPrimary = false; |
|
31 | + |
|
32 | + /** |
|
33 | + * Platform specific flags for indexes. |
|
34 | + * array($flagName => true) |
|
35 | + * |
|
36 | + * @var true[] |
|
37 | + */ |
|
38 | + protected $_flags = []; |
|
39 | + |
|
40 | + /** |
|
41 | + * @param string $name |
|
42 | + * @param string[] $columns |
|
43 | + * @param bool $isUnique |
|
44 | + * @param bool $isPrimary |
|
45 | + * @param string[] $flags |
|
46 | + * @param mixed[] $options |
|
47 | + */ |
|
48 | + public function __construct($name, array $columns, $isUnique = false, $isPrimary = false, array $flags = [], array $options = []) |
|
49 | + { |
|
50 | + } |
|
51 | + |
|
52 | + /** @throws InvalidArgumentException */ |
|
53 | + protected function _addColumn(string $column): void |
|
54 | + { |
|
55 | + } |
|
56 | + |
|
57 | + /** |
|
58 | + * {@inheritDoc} |
|
59 | + */ |
|
60 | + public function getColumns() |
|
61 | + { |
|
62 | + } |
|
63 | + |
|
64 | + /** |
|
65 | + * {@inheritDoc} |
|
66 | + */ |
|
67 | + public function getQuotedColumns(AbstractPlatform $platform) |
|
68 | + { |
|
69 | + } |
|
70 | + |
|
71 | + /** @return string[] */ |
|
72 | + public function getUnquotedColumns() |
|
73 | + { |
|
74 | + } |
|
75 | + |
|
76 | + /** |
|
77 | + * Is the index neither unique nor primary key? |
|
78 | + * |
|
79 | + * @return bool |
|
80 | + */ |
|
81 | + public function isSimpleIndex() |
|
82 | + { |
|
83 | + } |
|
84 | + |
|
85 | + /** @return bool */ |
|
86 | + public function isUnique() |
|
87 | + { |
|
88 | + } |
|
89 | + |
|
90 | + /** @return bool */ |
|
91 | + public function isPrimary() |
|
92 | + { |
|
93 | + } |
|
94 | + |
|
95 | + /** |
|
96 | + * @param string $name |
|
97 | + * @param int $pos |
|
98 | + * |
|
99 | + * @return bool |
|
100 | + */ |
|
101 | + public function hasColumnAtPosition($name, $pos = 0) |
|
102 | + { |
|
103 | + } |
|
104 | + |
|
105 | + /** |
|
106 | + * Checks if this index exactly spans the given column names in the correct order. |
|
107 | + * |
|
108 | + * @param string[] $columnNames |
|
109 | + * |
|
110 | + * @return bool |
|
111 | + */ |
|
112 | + public function spansColumns(array $columnNames) |
|
113 | + { |
|
114 | + } |
|
115 | + |
|
116 | + /** |
|
117 | + * Keeping misspelled function name for backwards compatibility |
|
118 | + * |
|
119 | + * @deprecated Use {@see isFulfilledBy()} instead. |
|
120 | + * |
|
121 | + * @return bool |
|
122 | + */ |
|
123 | + public function isFullfilledBy(Index $other) |
|
124 | + { |
|
125 | + } |
|
126 | + |
|
127 | + /** |
|
128 | + * Checks if the other index already fulfills all the indexing and constraint needs of the current one. |
|
129 | + */ |
|
130 | + public function isFulfilledBy(Index $other): bool |
|
131 | + { |
|
132 | + } |
|
133 | + |
|
134 | + /** |
|
135 | + * Detects if the other index is a non-unique, non primary index that can be overwritten by this one. |
|
136 | + * |
|
137 | + * @return bool |
|
138 | + */ |
|
139 | + public function overrules(Index $other) |
|
140 | + { |
|
141 | + } |
|
142 | + |
|
143 | + /** |
|
144 | + * Returns platform specific flags for indexes. |
|
145 | + * |
|
146 | + * @return string[] |
|
147 | + */ |
|
148 | + public function getFlags() |
|
149 | + { |
|
150 | + } |
|
151 | + |
|
152 | + /** |
|
153 | + * Adds Flag for an index that translates to platform specific handling. |
|
154 | + * |
|
155 | + * @param string $flag |
|
156 | + * |
|
157 | + * @return Index |
|
158 | + * |
|
159 | + * @example $index->addFlag('CLUSTERED') |
|
160 | + */ |
|
161 | + public function addFlag($flag) |
|
162 | + { |
|
163 | + } |
|
164 | + |
|
165 | + /** |
|
166 | + * Does this index have a specific flag? |
|
167 | + * |
|
168 | + * @param string $flag |
|
169 | + * |
|
170 | + * @return bool |
|
171 | + */ |
|
172 | + public function hasFlag($flag) |
|
173 | + { |
|
174 | + } |
|
175 | + |
|
176 | + /** |
|
177 | + * Removes a flag. |
|
178 | + * |
|
179 | + * @param string $flag |
|
180 | + * |
|
181 | + * @return void |
|
182 | + */ |
|
183 | + public function removeFlag($flag) |
|
184 | + { |
|
185 | + } |
|
186 | + |
|
187 | + /** |
|
188 | + * @param string $name |
|
189 | + * |
|
190 | + * @return bool |
|
191 | + */ |
|
192 | + public function hasOption($name) |
|
193 | + { |
|
194 | + } |
|
195 | + |
|
196 | + /** |
|
197 | + * @param string $name |
|
198 | + * |
|
199 | + * @return mixed |
|
200 | + */ |
|
201 | + public function getOption($name) |
|
202 | + { |
|
203 | + } |
|
204 | + |
|
205 | + /** @return mixed[] */ |
|
206 | + public function getOptions() |
|
207 | + { |
|
208 | + } |
|
209 | 209 | } |
@@ -25,147 +25,147 @@ |
||
25 | 25 | */ |
26 | 26 | abstract class AbstractAsset |
27 | 27 | { |
28 | - /** @var string */ |
|
29 | - protected $_name = ''; |
|
30 | - |
|
31 | - /** |
|
32 | - * Namespace of the asset. If none isset the default namespace is assumed. |
|
33 | - * |
|
34 | - * @var string|null |
|
35 | - */ |
|
36 | - protected $_namespace; |
|
37 | - |
|
38 | - /** @var bool */ |
|
39 | - protected $_quoted = false; |
|
40 | - |
|
41 | - /** |
|
42 | - * Sets the name of this asset. |
|
43 | - * |
|
44 | - * @param string $name |
|
45 | - * |
|
46 | - * @return void |
|
47 | - */ |
|
48 | - protected function _setName($name) |
|
49 | - { |
|
50 | - } |
|
51 | - |
|
52 | - /** |
|
53 | - * Is this asset in the default namespace? |
|
54 | - * |
|
55 | - * @param string $defaultNamespaceName |
|
56 | - * |
|
57 | - * @return bool |
|
58 | - */ |
|
59 | - public function isInDefaultNamespace($defaultNamespaceName) |
|
60 | - { |
|
61 | - } |
|
62 | - |
|
63 | - /** |
|
64 | - * Gets the namespace name of this asset. |
|
65 | - * |
|
66 | - * If NULL is returned this means the default namespace is used. |
|
67 | - * |
|
68 | - * @return string|null |
|
69 | - */ |
|
70 | - public function getNamespaceName() |
|
71 | - { |
|
72 | - } |
|
73 | - |
|
74 | - /** |
|
75 | - * The shortest name is stripped of the default namespace. All other |
|
76 | - * namespaced elements are returned as full-qualified names. |
|
77 | - * |
|
78 | - * @param string|null $defaultNamespaceName |
|
79 | - * |
|
80 | - * @return string |
|
81 | - */ |
|
82 | - public function getShortestName($defaultNamespaceName) |
|
83 | - { |
|
84 | - } |
|
85 | - |
|
86 | - /** |
|
87 | - * The normalized name is full-qualified and lower-cased. Lower-casing is |
|
88 | - * actually wrong, but we have to do it to keep our sanity. If you are |
|
89 | - * using database objects that only differentiate in the casing (FOO vs |
|
90 | - * Foo) then you will NOT be able to use Doctrine Schema abstraction. |
|
91 | - * |
|
92 | - * Every non-namespaced element is prefixed with the default namespace |
|
93 | - * name which is passed as argument to this method. |
|
94 | - * |
|
95 | - * @deprecated Use {@see getNamespaceName()} and {@see getName()} instead. |
|
96 | - * |
|
97 | - * @param string $defaultNamespaceName |
|
98 | - * |
|
99 | - * @return string |
|
100 | - */ |
|
101 | - public function getFullQualifiedName($defaultNamespaceName) |
|
102 | - { |
|
103 | - } |
|
104 | - |
|
105 | - /** |
|
106 | - * Checks if this asset's name is quoted. |
|
107 | - * |
|
108 | - * @return bool |
|
109 | - */ |
|
110 | - public function isQuoted() |
|
111 | - { |
|
112 | - } |
|
113 | - |
|
114 | - /** |
|
115 | - * Checks if this identifier is quoted. |
|
116 | - * |
|
117 | - * @param string $identifier |
|
118 | - * |
|
119 | - * @return bool |
|
120 | - */ |
|
121 | - protected function isIdentifierQuoted($identifier) |
|
122 | - { |
|
123 | - } |
|
124 | - |
|
125 | - /** |
|
126 | - * Trim quotes from the identifier. |
|
127 | - * |
|
128 | - * @param string $identifier |
|
129 | - * |
|
130 | - * @return string |
|
131 | - */ |
|
132 | - protected function trimQuotes($identifier) |
|
133 | - { |
|
134 | - } |
|
135 | - |
|
136 | - /** |
|
137 | - * Returns the name of this schema asset. |
|
138 | - * |
|
139 | - * @return string |
|
140 | - */ |
|
141 | - public function getName() |
|
142 | - { |
|
143 | - } |
|
144 | - |
|
145 | - /** |
|
146 | - * Gets the quoted representation of this asset but only if it was defined with one. Otherwise |
|
147 | - * return the plain unquoted value as inserted. |
|
148 | - * |
|
149 | - * @return string |
|
150 | - */ |
|
151 | - public function getQuotedName(AbstractPlatform $platform) |
|
152 | - { |
|
153 | - } |
|
154 | - |
|
155 | - /** |
|
156 | - * Generates an identifier from a list of column names obeying a certain string length. |
|
157 | - * |
|
158 | - * This is especially important for Oracle, since it does not allow identifiers larger than 30 chars, |
|
159 | - * however building idents automatically for foreign keys, composite keys or such can easily create |
|
160 | - * very long names. |
|
161 | - * |
|
162 | - * @param string[] $columnNames |
|
163 | - * @param string $prefix |
|
164 | - * @param int $maxSize |
|
165 | - * |
|
166 | - * @return string |
|
167 | - */ |
|
168 | - protected function _generateIdentifierName($columnNames, $prefix = '', $maxSize = 30) |
|
169 | - { |
|
170 | - } |
|
28 | + /** @var string */ |
|
29 | + protected $_name = ''; |
|
30 | + |
|
31 | + /** |
|
32 | + * Namespace of the asset. If none isset the default namespace is assumed. |
|
33 | + * |
|
34 | + * @var string|null |
|
35 | + */ |
|
36 | + protected $_namespace; |
|
37 | + |
|
38 | + /** @var bool */ |
|
39 | + protected $_quoted = false; |
|
40 | + |
|
41 | + /** |
|
42 | + * Sets the name of this asset. |
|
43 | + * |
|
44 | + * @param string $name |
|
45 | + * |
|
46 | + * @return void |
|
47 | + */ |
|
48 | + protected function _setName($name) |
|
49 | + { |
|
50 | + } |
|
51 | + |
|
52 | + /** |
|
53 | + * Is this asset in the default namespace? |
|
54 | + * |
|
55 | + * @param string $defaultNamespaceName |
|
56 | + * |
|
57 | + * @return bool |
|
58 | + */ |
|
59 | + public function isInDefaultNamespace($defaultNamespaceName) |
|
60 | + { |
|
61 | + } |
|
62 | + |
|
63 | + /** |
|
64 | + * Gets the namespace name of this asset. |
|
65 | + * |
|
66 | + * If NULL is returned this means the default namespace is used. |
|
67 | + * |
|
68 | + * @return string|null |
|
69 | + */ |
|
70 | + public function getNamespaceName() |
|
71 | + { |
|
72 | + } |
|
73 | + |
|
74 | + /** |
|
75 | + * The shortest name is stripped of the default namespace. All other |
|
76 | + * namespaced elements are returned as full-qualified names. |
|
77 | + * |
|
78 | + * @param string|null $defaultNamespaceName |
|
79 | + * |
|
80 | + * @return string |
|
81 | + */ |
|
82 | + public function getShortestName($defaultNamespaceName) |
|
83 | + { |
|
84 | + } |
|
85 | + |
|
86 | + /** |
|
87 | + * The normalized name is full-qualified and lower-cased. Lower-casing is |
|
88 | + * actually wrong, but we have to do it to keep our sanity. If you are |
|
89 | + * using database objects that only differentiate in the casing (FOO vs |
|
90 | + * Foo) then you will NOT be able to use Doctrine Schema abstraction. |
|
91 | + * |
|
92 | + * Every non-namespaced element is prefixed with the default namespace |
|
93 | + * name which is passed as argument to this method. |
|
94 | + * |
|
95 | + * @deprecated Use {@see getNamespaceName()} and {@see getName()} instead. |
|
96 | + * |
|
97 | + * @param string $defaultNamespaceName |
|
98 | + * |
|
99 | + * @return string |
|
100 | + */ |
|
101 | + public function getFullQualifiedName($defaultNamespaceName) |
|
102 | + { |
|
103 | + } |
|
104 | + |
|
105 | + /** |
|
106 | + * Checks if this asset's name is quoted. |
|
107 | + * |
|
108 | + * @return bool |
|
109 | + */ |
|
110 | + public function isQuoted() |
|
111 | + { |
|
112 | + } |
|
113 | + |
|
114 | + /** |
|
115 | + * Checks if this identifier is quoted. |
|
116 | + * |
|
117 | + * @param string $identifier |
|
118 | + * |
|
119 | + * @return bool |
|
120 | + */ |
|
121 | + protected function isIdentifierQuoted($identifier) |
|
122 | + { |
|
123 | + } |
|
124 | + |
|
125 | + /** |
|
126 | + * Trim quotes from the identifier. |
|
127 | + * |
|
128 | + * @param string $identifier |
|
129 | + * |
|
130 | + * @return string |
|
131 | + */ |
|
132 | + protected function trimQuotes($identifier) |
|
133 | + { |
|
134 | + } |
|
135 | + |
|
136 | + /** |
|
137 | + * Returns the name of this schema asset. |
|
138 | + * |
|
139 | + * @return string |
|
140 | + */ |
|
141 | + public function getName() |
|
142 | + { |
|
143 | + } |
|
144 | + |
|
145 | + /** |
|
146 | + * Gets the quoted representation of this asset but only if it was defined with one. Otherwise |
|
147 | + * return the plain unquoted value as inserted. |
|
148 | + * |
|
149 | + * @return string |
|
150 | + */ |
|
151 | + public function getQuotedName(AbstractPlatform $platform) |
|
152 | + { |
|
153 | + } |
|
154 | + |
|
155 | + /** |
|
156 | + * Generates an identifier from a list of column names obeying a certain string length. |
|
157 | + * |
|
158 | + * This is especially important for Oracle, since it does not allow identifiers larger than 30 chars, |
|
159 | + * however building idents automatically for foreign keys, composite keys or such can easily create |
|
160 | + * very long names. |
|
161 | + * |
|
162 | + * @param string[] $columnNames |
|
163 | + * @param string $prefix |
|
164 | + * @param int $maxSize |
|
165 | + * |
|
166 | + * @return string |
|
167 | + */ |
|
168 | + protected function _generateIdentifierName($columnNames, $prefix = '', $maxSize = 30) |
|
169 | + { |
|
170 | + } |
|
171 | 171 | } |
@@ -34,409 +34,409 @@ |
||
34 | 34 | */ |
35 | 35 | class Command |
36 | 36 | { |
37 | - // see https://tldp.org/LDP/abs/html/exitcodes.html |
|
38 | - public const SUCCESS = 0; |
|
39 | - public const FAILURE = 1; |
|
40 | - public const INVALID = 2; |
|
41 | - |
|
42 | - /** |
|
43 | - * @var string|null The default command name |
|
44 | - * |
|
45 | - * @deprecated since Symfony 6.1, use the AsCommand attribute instead |
|
46 | - */ |
|
47 | - protected static $defaultName; |
|
48 | - |
|
49 | - /** |
|
50 | - * @var string|null The default command description |
|
51 | - * |
|
52 | - * @deprecated since Symfony 6.1, use the AsCommand attribute instead |
|
53 | - */ |
|
54 | - protected static $defaultDescription; |
|
55 | - |
|
56 | - public static function getDefaultName(): ?string |
|
57 | - { |
|
58 | - } |
|
59 | - |
|
60 | - public static function getDefaultDescription(): ?string |
|
61 | - { |
|
62 | - } |
|
63 | - |
|
64 | - /** |
|
65 | - * @param string|null $name The name of the command; passing null means it must be set in configure() |
|
66 | - * |
|
67 | - * @throws LogicException When the command name is empty |
|
68 | - */ |
|
69 | - public function __construct(?string $name = null) |
|
70 | - { |
|
71 | - } |
|
72 | - |
|
73 | - /** |
|
74 | - * Ignores validation errors. |
|
75 | - * |
|
76 | - * This is mainly useful for the help command. |
|
77 | - * |
|
78 | - * @return void |
|
79 | - */ |
|
80 | - public function ignoreValidationErrors() |
|
81 | - { |
|
82 | - } |
|
83 | - |
|
84 | - /** |
|
85 | - * @return void |
|
86 | - */ |
|
87 | - public function setApplication(?Application $application = null) |
|
88 | - { |
|
89 | - } |
|
90 | - |
|
91 | - /** |
|
92 | - * @return void |
|
93 | - */ |
|
94 | - public function setHelperSet(HelperSet $helperSet) |
|
95 | - { |
|
96 | - } |
|
97 | - |
|
98 | - /** |
|
99 | - * Gets the helper set. |
|
100 | - */ |
|
101 | - public function getHelperSet(): ?HelperSet |
|
102 | - { |
|
103 | - } |
|
104 | - |
|
105 | - /** |
|
106 | - * Gets the application instance for this command. |
|
107 | - */ |
|
108 | - public function getApplication(): ?Application |
|
109 | - { |
|
110 | - } |
|
111 | - |
|
112 | - /** |
|
113 | - * Checks whether the command is enabled or not in the current environment. |
|
114 | - * |
|
115 | - * Override this to check for x or y and return false if the command cannot |
|
116 | - * run properly under the current conditions. |
|
117 | - * |
|
118 | - * @return bool |
|
119 | - */ |
|
120 | - public function isEnabled() |
|
121 | - { |
|
122 | - } |
|
123 | - |
|
124 | - /** |
|
125 | - * Configures the current command. |
|
126 | - * |
|
127 | - * @return void |
|
128 | - */ |
|
129 | - protected function configure() |
|
130 | - { |
|
131 | - } |
|
132 | - |
|
133 | - /** |
|
134 | - * Executes the current command. |
|
135 | - * |
|
136 | - * This method is not abstract because you can use this class |
|
137 | - * as a concrete class. In this case, instead of defining the |
|
138 | - * execute() method, you set the code to execute by passing |
|
139 | - * a Closure to the setCode() method. |
|
140 | - * |
|
141 | - * @return int 0 if everything went fine, or an exit code |
|
142 | - * |
|
143 | - * @throws LogicException When this abstract method is not implemented |
|
144 | - * |
|
145 | - * @see setCode() |
|
146 | - */ |
|
147 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
148 | - { |
|
149 | - } |
|
150 | - |
|
151 | - /** |
|
152 | - * Interacts with the user. |
|
153 | - * |
|
154 | - * This method is executed before the InputDefinition is validated. |
|
155 | - * This means that this is the only place where the command can |
|
156 | - * interactively ask for values of missing required arguments. |
|
157 | - * |
|
158 | - * @return void |
|
159 | - */ |
|
160 | - protected function interact(InputInterface $input, OutputInterface $output) |
|
161 | - { |
|
162 | - } |
|
163 | - |
|
164 | - /** |
|
165 | - * Initializes the command after the input has been bound and before the input |
|
166 | - * is validated. |
|
167 | - * |
|
168 | - * This is mainly useful when a lot of commands extends one main command |
|
169 | - * where some things need to be initialized based on the input arguments and options. |
|
170 | - * |
|
171 | - * @see InputInterface::bind() |
|
172 | - * @see InputInterface::validate() |
|
173 | - * |
|
174 | - * @return void |
|
175 | - */ |
|
176 | - protected function initialize(InputInterface $input, OutputInterface $output) |
|
177 | - { |
|
178 | - } |
|
179 | - |
|
180 | - /** |
|
181 | - * Runs the command. |
|
182 | - * |
|
183 | - * The code to execute is either defined directly with the |
|
184 | - * setCode() method or by overriding the execute() method |
|
185 | - * in a sub-class. |
|
186 | - * |
|
187 | - * @return int The command exit code |
|
188 | - * |
|
189 | - * @throws ExceptionInterface When input binding fails. Bypass this by calling {@link ignoreValidationErrors()}. |
|
190 | - * |
|
191 | - * @see setCode() |
|
192 | - * @see execute() |
|
193 | - */ |
|
194 | - public function run(InputInterface $input, OutputInterface $output): int |
|
195 | - { |
|
196 | - } |
|
197 | - |
|
198 | - /** |
|
199 | - * Adds suggestions to $suggestions for the current completion input (e.g. option or argument). |
|
200 | - */ |
|
201 | - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void |
|
202 | - { |
|
203 | - } |
|
204 | - |
|
205 | - /** |
|
206 | - * Sets the code to execute when running this command. |
|
207 | - * |
|
208 | - * If this method is used, it overrides the code defined |
|
209 | - * in the execute() method. |
|
210 | - * |
|
211 | - * @param callable $code A callable(InputInterface $input, OutputInterface $output) |
|
212 | - * |
|
213 | - * @return $this |
|
214 | - * |
|
215 | - * @throws InvalidArgumentException |
|
216 | - * |
|
217 | - * @see execute() |
|
218 | - */ |
|
219 | - public function setCode(callable $code): static |
|
220 | - { |
|
221 | - } |
|
222 | - |
|
223 | - /** |
|
224 | - * Merges the application definition with the command definition. |
|
225 | - * |
|
226 | - * This method is not part of public API and should not be used directly. |
|
227 | - * |
|
228 | - * @param bool $mergeArgs Whether to merge or not the Application definition arguments to Command definition arguments |
|
229 | - * |
|
230 | - * @internal |
|
231 | - */ |
|
232 | - public function mergeApplicationDefinition(bool $mergeArgs = true): void |
|
233 | - { |
|
234 | - } |
|
235 | - |
|
236 | - /** |
|
237 | - * Sets an array of argument and option instances. |
|
238 | - * |
|
239 | - * @return $this |
|
240 | - */ |
|
241 | - public function setDefinition(array|InputDefinition $definition): static |
|
242 | - { |
|
243 | - } |
|
244 | - |
|
245 | - /** |
|
246 | - * Gets the InputDefinition attached to this Command. |
|
247 | - */ |
|
248 | - public function getDefinition(): InputDefinition |
|
249 | - { |
|
250 | - } |
|
251 | - |
|
252 | - /** |
|
253 | - * Gets the InputDefinition to be used to create representations of this Command. |
|
254 | - * |
|
255 | - * Can be overridden to provide the original command representation when it would otherwise |
|
256 | - * be changed by merging with the application InputDefinition. |
|
257 | - * |
|
258 | - * This method is not part of public API and should not be used directly. |
|
259 | - */ |
|
260 | - public function getNativeDefinition(): InputDefinition |
|
261 | - { |
|
262 | - } |
|
263 | - |
|
264 | - /** |
|
265 | - * Adds an argument. |
|
266 | - * |
|
267 | - * @param $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL |
|
268 | - * @param $default The default value (for InputArgument::OPTIONAL mode only) |
|
269 | - * @param array|\Closure(CompletionInput,CompletionSuggestions):list<string|Suggestion> $suggestedValues The values used for input completion |
|
270 | - * |
|
271 | - * @return $this |
|
272 | - * |
|
273 | - * @throws InvalidArgumentException When argument mode is not valid |
|
274 | - */ |
|
275 | - public function addArgument(string $name, ?int $mode = null, string $description = '', mixed $default = null): static |
|
276 | - { |
|
277 | - } |
|
278 | - |
|
279 | - /** |
|
280 | - * Adds an option. |
|
281 | - * |
|
282 | - * @param $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts |
|
283 | - * @param $mode The option mode: One of the InputOption::VALUE_* constants |
|
284 | - * @param $default The default value (must be null for InputOption::VALUE_NONE) |
|
285 | - * @param array|\Closure(CompletionInput,CompletionSuggestions):list<string|Suggestion> $suggestedValues The values used for input completion |
|
286 | - * |
|
287 | - * @return $this |
|
288 | - * |
|
289 | - * @throws InvalidArgumentException If option mode is invalid or incompatible |
|
290 | - */ |
|
291 | - public function addOption(string $name, string|array|null $shortcut = null, ?int $mode = null, string $description = '', mixed $default = null): static |
|
292 | - { |
|
293 | - } |
|
294 | - |
|
295 | - /** |
|
296 | - * Sets the name of the command. |
|
297 | - * |
|
298 | - * This method can set both the namespace and the name if |
|
299 | - * you separate them by a colon (:) |
|
300 | - * |
|
301 | - * $command->setName('foo:bar'); |
|
302 | - * |
|
303 | - * @return $this |
|
304 | - * |
|
305 | - * @throws InvalidArgumentException When the name is invalid |
|
306 | - */ |
|
307 | - public function setName(string $name): static |
|
308 | - { |
|
309 | - } |
|
310 | - |
|
311 | - /** |
|
312 | - * Sets the process title of the command. |
|
313 | - * |
|
314 | - * This feature should be used only when creating a long process command, |
|
315 | - * like a daemon. |
|
316 | - * |
|
317 | - * @return $this |
|
318 | - */ |
|
319 | - public function setProcessTitle(string $title): static |
|
320 | - { |
|
321 | - } |
|
322 | - |
|
323 | - /** |
|
324 | - * Returns the command name. |
|
325 | - */ |
|
326 | - public function getName(): ?string |
|
327 | - { |
|
328 | - } |
|
329 | - |
|
330 | - /** |
|
331 | - * @param bool $hidden Whether or not the command should be hidden from the list of commands |
|
332 | - * |
|
333 | - * @return $this |
|
334 | - */ |
|
335 | - public function setHidden(bool $hidden = true): static |
|
336 | - { |
|
337 | - } |
|
338 | - |
|
339 | - /** |
|
340 | - * @return bool whether the command should be publicly shown or not |
|
341 | - */ |
|
342 | - public function isHidden(): bool |
|
343 | - { |
|
344 | - } |
|
345 | - |
|
346 | - /** |
|
347 | - * Sets the description for the command. |
|
348 | - * |
|
349 | - * @return $this |
|
350 | - */ |
|
351 | - public function setDescription(string $description): static |
|
352 | - { |
|
353 | - } |
|
354 | - |
|
355 | - /** |
|
356 | - * Returns the description for the command. |
|
357 | - */ |
|
358 | - public function getDescription(): string |
|
359 | - { |
|
360 | - } |
|
361 | - |
|
362 | - /** |
|
363 | - * Sets the help for the command. |
|
364 | - * |
|
365 | - * @return $this |
|
366 | - */ |
|
367 | - public function setHelp(string $help): static |
|
368 | - { |
|
369 | - } |
|
370 | - |
|
371 | - /** |
|
372 | - * Returns the help for the command. |
|
373 | - */ |
|
374 | - public function getHelp(): string |
|
375 | - { |
|
376 | - } |
|
377 | - |
|
378 | - /** |
|
379 | - * Returns the processed help for the command replacing the %command.name% and |
|
380 | - * %command.full_name% patterns with the real values dynamically. |
|
381 | - */ |
|
382 | - public function getProcessedHelp(): string |
|
383 | - { |
|
384 | - } |
|
385 | - |
|
386 | - /** |
|
387 | - * Sets the aliases for the command. |
|
388 | - * |
|
389 | - * @param string[] $aliases An array of aliases for the command |
|
390 | - * |
|
391 | - * @return $this |
|
392 | - * |
|
393 | - * @throws InvalidArgumentException When an alias is invalid |
|
394 | - */ |
|
395 | - public function setAliases(iterable $aliases): static |
|
396 | - { |
|
397 | - } |
|
398 | - |
|
399 | - /** |
|
400 | - * Returns the aliases for the command. |
|
401 | - */ |
|
402 | - public function getAliases(): array |
|
403 | - { |
|
404 | - } |
|
405 | - |
|
406 | - /** |
|
407 | - * Returns the synopsis for the command. |
|
408 | - * |
|
409 | - * @param bool $short Whether to show the short version of the synopsis (with options folded) or not |
|
410 | - */ |
|
411 | - public function getSynopsis(bool $short = false): string |
|
412 | - { |
|
413 | - } |
|
414 | - |
|
415 | - /** |
|
416 | - * Add a command usage example, it'll be prefixed with the command name. |
|
417 | - * |
|
418 | - * @return $this |
|
419 | - */ |
|
420 | - public function addUsage(string $usage): static |
|
421 | - { |
|
422 | - } |
|
423 | - |
|
424 | - /** |
|
425 | - * Returns alternative usages of the command. |
|
426 | - */ |
|
427 | - public function getUsages(): array |
|
428 | - { |
|
429 | - } |
|
430 | - |
|
431 | - /** |
|
432 | - * Gets a helper instance by name. |
|
433 | - * |
|
434 | - * @return HelperInterface |
|
435 | - * |
|
436 | - * @throws LogicException if no HelperSet is defined |
|
437 | - * @throws InvalidArgumentException if the helper is not defined |
|
438 | - */ |
|
439 | - public function getHelper(string $name): mixed |
|
440 | - { |
|
441 | - } |
|
37 | + // see https://tldp.org/LDP/abs/html/exitcodes.html |
|
38 | + public const SUCCESS = 0; |
|
39 | + public const FAILURE = 1; |
|
40 | + public const INVALID = 2; |
|
41 | + |
|
42 | + /** |
|
43 | + * @var string|null The default command name |
|
44 | + * |
|
45 | + * @deprecated since Symfony 6.1, use the AsCommand attribute instead |
|
46 | + */ |
|
47 | + protected static $defaultName; |
|
48 | + |
|
49 | + /** |
|
50 | + * @var string|null The default command description |
|
51 | + * |
|
52 | + * @deprecated since Symfony 6.1, use the AsCommand attribute instead |
|
53 | + */ |
|
54 | + protected static $defaultDescription; |
|
55 | + |
|
56 | + public static function getDefaultName(): ?string |
|
57 | + { |
|
58 | + } |
|
59 | + |
|
60 | + public static function getDefaultDescription(): ?string |
|
61 | + { |
|
62 | + } |
|
63 | + |
|
64 | + /** |
|
65 | + * @param string|null $name The name of the command; passing null means it must be set in configure() |
|
66 | + * |
|
67 | + * @throws LogicException When the command name is empty |
|
68 | + */ |
|
69 | + public function __construct(?string $name = null) |
|
70 | + { |
|
71 | + } |
|
72 | + |
|
73 | + /** |
|
74 | + * Ignores validation errors. |
|
75 | + * |
|
76 | + * This is mainly useful for the help command. |
|
77 | + * |
|
78 | + * @return void |
|
79 | + */ |
|
80 | + public function ignoreValidationErrors() |
|
81 | + { |
|
82 | + } |
|
83 | + |
|
84 | + /** |
|
85 | + * @return void |
|
86 | + */ |
|
87 | + public function setApplication(?Application $application = null) |
|
88 | + { |
|
89 | + } |
|
90 | + |
|
91 | + /** |
|
92 | + * @return void |
|
93 | + */ |
|
94 | + public function setHelperSet(HelperSet $helperSet) |
|
95 | + { |
|
96 | + } |
|
97 | + |
|
98 | + /** |
|
99 | + * Gets the helper set. |
|
100 | + */ |
|
101 | + public function getHelperSet(): ?HelperSet |
|
102 | + { |
|
103 | + } |
|
104 | + |
|
105 | + /** |
|
106 | + * Gets the application instance for this command. |
|
107 | + */ |
|
108 | + public function getApplication(): ?Application |
|
109 | + { |
|
110 | + } |
|
111 | + |
|
112 | + /** |
|
113 | + * Checks whether the command is enabled or not in the current environment. |
|
114 | + * |
|
115 | + * Override this to check for x or y and return false if the command cannot |
|
116 | + * run properly under the current conditions. |
|
117 | + * |
|
118 | + * @return bool |
|
119 | + */ |
|
120 | + public function isEnabled() |
|
121 | + { |
|
122 | + } |
|
123 | + |
|
124 | + /** |
|
125 | + * Configures the current command. |
|
126 | + * |
|
127 | + * @return void |
|
128 | + */ |
|
129 | + protected function configure() |
|
130 | + { |
|
131 | + } |
|
132 | + |
|
133 | + /** |
|
134 | + * Executes the current command. |
|
135 | + * |
|
136 | + * This method is not abstract because you can use this class |
|
137 | + * as a concrete class. In this case, instead of defining the |
|
138 | + * execute() method, you set the code to execute by passing |
|
139 | + * a Closure to the setCode() method. |
|
140 | + * |
|
141 | + * @return int 0 if everything went fine, or an exit code |
|
142 | + * |
|
143 | + * @throws LogicException When this abstract method is not implemented |
|
144 | + * |
|
145 | + * @see setCode() |
|
146 | + */ |
|
147 | + protected function execute(InputInterface $input, OutputInterface $output) |
|
148 | + { |
|
149 | + } |
|
150 | + |
|
151 | + /** |
|
152 | + * Interacts with the user. |
|
153 | + * |
|
154 | + * This method is executed before the InputDefinition is validated. |
|
155 | + * This means that this is the only place where the command can |
|
156 | + * interactively ask for values of missing required arguments. |
|
157 | + * |
|
158 | + * @return void |
|
159 | + */ |
|
160 | + protected function interact(InputInterface $input, OutputInterface $output) |
|
161 | + { |
|
162 | + } |
|
163 | + |
|
164 | + /** |
|
165 | + * Initializes the command after the input has been bound and before the input |
|
166 | + * is validated. |
|
167 | + * |
|
168 | + * This is mainly useful when a lot of commands extends one main command |
|
169 | + * where some things need to be initialized based on the input arguments and options. |
|
170 | + * |
|
171 | + * @see InputInterface::bind() |
|
172 | + * @see InputInterface::validate() |
|
173 | + * |
|
174 | + * @return void |
|
175 | + */ |
|
176 | + protected function initialize(InputInterface $input, OutputInterface $output) |
|
177 | + { |
|
178 | + } |
|
179 | + |
|
180 | + /** |
|
181 | + * Runs the command. |
|
182 | + * |
|
183 | + * The code to execute is either defined directly with the |
|
184 | + * setCode() method or by overriding the execute() method |
|
185 | + * in a sub-class. |
|
186 | + * |
|
187 | + * @return int The command exit code |
|
188 | + * |
|
189 | + * @throws ExceptionInterface When input binding fails. Bypass this by calling {@link ignoreValidationErrors()}. |
|
190 | + * |
|
191 | + * @see setCode() |
|
192 | + * @see execute() |
|
193 | + */ |
|
194 | + public function run(InputInterface $input, OutputInterface $output): int |
|
195 | + { |
|
196 | + } |
|
197 | + |
|
198 | + /** |
|
199 | + * Adds suggestions to $suggestions for the current completion input (e.g. option or argument). |
|
200 | + */ |
|
201 | + public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void |
|
202 | + { |
|
203 | + } |
|
204 | + |
|
205 | + /** |
|
206 | + * Sets the code to execute when running this command. |
|
207 | + * |
|
208 | + * If this method is used, it overrides the code defined |
|
209 | + * in the execute() method. |
|
210 | + * |
|
211 | + * @param callable $code A callable(InputInterface $input, OutputInterface $output) |
|
212 | + * |
|
213 | + * @return $this |
|
214 | + * |
|
215 | + * @throws InvalidArgumentException |
|
216 | + * |
|
217 | + * @see execute() |
|
218 | + */ |
|
219 | + public function setCode(callable $code): static |
|
220 | + { |
|
221 | + } |
|
222 | + |
|
223 | + /** |
|
224 | + * Merges the application definition with the command definition. |
|
225 | + * |
|
226 | + * This method is not part of public API and should not be used directly. |
|
227 | + * |
|
228 | + * @param bool $mergeArgs Whether to merge or not the Application definition arguments to Command definition arguments |
|
229 | + * |
|
230 | + * @internal |
|
231 | + */ |
|
232 | + public function mergeApplicationDefinition(bool $mergeArgs = true): void |
|
233 | + { |
|
234 | + } |
|
235 | + |
|
236 | + /** |
|
237 | + * Sets an array of argument and option instances. |
|
238 | + * |
|
239 | + * @return $this |
|
240 | + */ |
|
241 | + public function setDefinition(array|InputDefinition $definition): static |
|
242 | + { |
|
243 | + } |
|
244 | + |
|
245 | + /** |
|
246 | + * Gets the InputDefinition attached to this Command. |
|
247 | + */ |
|
248 | + public function getDefinition(): InputDefinition |
|
249 | + { |
|
250 | + } |
|
251 | + |
|
252 | + /** |
|
253 | + * Gets the InputDefinition to be used to create representations of this Command. |
|
254 | + * |
|
255 | + * Can be overridden to provide the original command representation when it would otherwise |
|
256 | + * be changed by merging with the application InputDefinition. |
|
257 | + * |
|
258 | + * This method is not part of public API and should not be used directly. |
|
259 | + */ |
|
260 | + public function getNativeDefinition(): InputDefinition |
|
261 | + { |
|
262 | + } |
|
263 | + |
|
264 | + /** |
|
265 | + * Adds an argument. |
|
266 | + * |
|
267 | + * @param $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL |
|
268 | + * @param $default The default value (for InputArgument::OPTIONAL mode only) |
|
269 | + * @param array|\Closure(CompletionInput,CompletionSuggestions):list<string|Suggestion> $suggestedValues The values used for input completion |
|
270 | + * |
|
271 | + * @return $this |
|
272 | + * |
|
273 | + * @throws InvalidArgumentException When argument mode is not valid |
|
274 | + */ |
|
275 | + public function addArgument(string $name, ?int $mode = null, string $description = '', mixed $default = null): static |
|
276 | + { |
|
277 | + } |
|
278 | + |
|
279 | + /** |
|
280 | + * Adds an option. |
|
281 | + * |
|
282 | + * @param $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts |
|
283 | + * @param $mode The option mode: One of the InputOption::VALUE_* constants |
|
284 | + * @param $default The default value (must be null for InputOption::VALUE_NONE) |
|
285 | + * @param array|\Closure(CompletionInput,CompletionSuggestions):list<string|Suggestion> $suggestedValues The values used for input completion |
|
286 | + * |
|
287 | + * @return $this |
|
288 | + * |
|
289 | + * @throws InvalidArgumentException If option mode is invalid or incompatible |
|
290 | + */ |
|
291 | + public function addOption(string $name, string|array|null $shortcut = null, ?int $mode = null, string $description = '', mixed $default = null): static |
|
292 | + { |
|
293 | + } |
|
294 | + |
|
295 | + /** |
|
296 | + * Sets the name of the command. |
|
297 | + * |
|
298 | + * This method can set both the namespace and the name if |
|
299 | + * you separate them by a colon (:) |
|
300 | + * |
|
301 | + * $command->setName('foo:bar'); |
|
302 | + * |
|
303 | + * @return $this |
|
304 | + * |
|
305 | + * @throws InvalidArgumentException When the name is invalid |
|
306 | + */ |
|
307 | + public function setName(string $name): static |
|
308 | + { |
|
309 | + } |
|
310 | + |
|
311 | + /** |
|
312 | + * Sets the process title of the command. |
|
313 | + * |
|
314 | + * This feature should be used only when creating a long process command, |
|
315 | + * like a daemon. |
|
316 | + * |
|
317 | + * @return $this |
|
318 | + */ |
|
319 | + public function setProcessTitle(string $title): static |
|
320 | + { |
|
321 | + } |
|
322 | + |
|
323 | + /** |
|
324 | + * Returns the command name. |
|
325 | + */ |
|
326 | + public function getName(): ?string |
|
327 | + { |
|
328 | + } |
|
329 | + |
|
330 | + /** |
|
331 | + * @param bool $hidden Whether or not the command should be hidden from the list of commands |
|
332 | + * |
|
333 | + * @return $this |
|
334 | + */ |
|
335 | + public function setHidden(bool $hidden = true): static |
|
336 | + { |
|
337 | + } |
|
338 | + |
|
339 | + /** |
|
340 | + * @return bool whether the command should be publicly shown or not |
|
341 | + */ |
|
342 | + public function isHidden(): bool |
|
343 | + { |
|
344 | + } |
|
345 | + |
|
346 | + /** |
|
347 | + * Sets the description for the command. |
|
348 | + * |
|
349 | + * @return $this |
|
350 | + */ |
|
351 | + public function setDescription(string $description): static |
|
352 | + { |
|
353 | + } |
|
354 | + |
|
355 | + /** |
|
356 | + * Returns the description for the command. |
|
357 | + */ |
|
358 | + public function getDescription(): string |
|
359 | + { |
|
360 | + } |
|
361 | + |
|
362 | + /** |
|
363 | + * Sets the help for the command. |
|
364 | + * |
|
365 | + * @return $this |
|
366 | + */ |
|
367 | + public function setHelp(string $help): static |
|
368 | + { |
|
369 | + } |
|
370 | + |
|
371 | + /** |
|
372 | + * Returns the help for the command. |
|
373 | + */ |
|
374 | + public function getHelp(): string |
|
375 | + { |
|
376 | + } |
|
377 | + |
|
378 | + /** |
|
379 | + * Returns the processed help for the command replacing the %command.name% and |
|
380 | + * %command.full_name% patterns with the real values dynamically. |
|
381 | + */ |
|
382 | + public function getProcessedHelp(): string |
|
383 | + { |
|
384 | + } |
|
385 | + |
|
386 | + /** |
|
387 | + * Sets the aliases for the command. |
|
388 | + * |
|
389 | + * @param string[] $aliases An array of aliases for the command |
|
390 | + * |
|
391 | + * @return $this |
|
392 | + * |
|
393 | + * @throws InvalidArgumentException When an alias is invalid |
|
394 | + */ |
|
395 | + public function setAliases(iterable $aliases): static |
|
396 | + { |
|
397 | + } |
|
398 | + |
|
399 | + /** |
|
400 | + * Returns the aliases for the command. |
|
401 | + */ |
|
402 | + public function getAliases(): array |
|
403 | + { |
|
404 | + } |
|
405 | + |
|
406 | + /** |
|
407 | + * Returns the synopsis for the command. |
|
408 | + * |
|
409 | + * @param bool $short Whether to show the short version of the synopsis (with options folded) or not |
|
410 | + */ |
|
411 | + public function getSynopsis(bool $short = false): string |
|
412 | + { |
|
413 | + } |
|
414 | + |
|
415 | + /** |
|
416 | + * Add a command usage example, it'll be prefixed with the command name. |
|
417 | + * |
|
418 | + * @return $this |
|
419 | + */ |
|
420 | + public function addUsage(string $usage): static |
|
421 | + { |
|
422 | + } |
|
423 | + |
|
424 | + /** |
|
425 | + * Returns alternative usages of the command. |
|
426 | + */ |
|
427 | + public function getUsages(): array |
|
428 | + { |
|
429 | + } |
|
430 | + |
|
431 | + /** |
|
432 | + * Gets a helper instance by name. |
|
433 | + * |
|
434 | + * @return HelperInterface |
|
435 | + * |
|
436 | + * @throws LogicException if no HelperSet is defined |
|
437 | + * @throws InvalidArgumentException if the helper is not defined |
|
438 | + */ |
|
439 | + public function getHelper(string $name): mixed |
|
440 | + { |
|
441 | + } |
|
442 | 442 | } |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | * |
239 | 239 | * @return $this |
240 | 240 | */ |
241 | - public function setDefinition(array|InputDefinition $definition): static |
|
241 | + public function setDefinition(array | InputDefinition $definition): static |
|
242 | 242 | { |
243 | 243 | } |
244 | 244 | |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | * |
289 | 289 | * @throws InvalidArgumentException If option mode is invalid or incompatible |
290 | 290 | */ |
291 | - public function addOption(string $name, string|array|null $shortcut = null, ?int $mode = null, string $description = '', mixed $default = null): static |
|
291 | + public function addOption(string $name, string | array | null $shortcut = null, ?int $mode = null, string $description = '', mixed $default = null): static |
|
292 | 292 | { |
293 | 293 | } |
294 | 294 |