@@ -25,83 +25,83 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | class InputArgument |
| 27 | 27 | { |
| 28 | - public const REQUIRED = 1; |
|
| 29 | - public const OPTIONAL = 2; |
|
| 30 | - public const IS_ARRAY = 4; |
|
| 28 | + public const REQUIRED = 1; |
|
| 29 | + public const OPTIONAL = 2; |
|
| 30 | + public const IS_ARRAY = 4; |
|
| 31 | 31 | |
| 32 | - /** |
|
| 33 | - * @param string $name The argument name |
|
| 34 | - * @param int|null $mode The argument mode: a bit mask of self::REQUIRED, self::OPTIONAL and self::IS_ARRAY |
|
| 35 | - * @param string $description A description text |
|
| 36 | - * @param string|bool|int|float|array|null $default The default value (for self::OPTIONAL mode only) |
|
| 37 | - * @param array|\Closure(CompletionInput,CompletionSuggestions):list<string|Suggestion> $suggestedValues The values used for input completion |
|
| 38 | - * |
|
| 39 | - * @throws InvalidArgumentException When argument mode is not valid |
|
| 40 | - */ |
|
| 41 | - public function __construct(string $name, ?int $mode = null, string $description = '', string|bool|int|float|array|null $default = null, \Closure|array $suggestedValues = []) |
|
| 42 | - { |
|
| 43 | - } |
|
| 32 | + /** |
|
| 33 | + * @param string $name The argument name |
|
| 34 | + * @param int|null $mode The argument mode: a bit mask of self::REQUIRED, self::OPTIONAL and self::IS_ARRAY |
|
| 35 | + * @param string $description A description text |
|
| 36 | + * @param string|bool|int|float|array|null $default The default value (for self::OPTIONAL mode only) |
|
| 37 | + * @param array|\Closure(CompletionInput,CompletionSuggestions):list<string|Suggestion> $suggestedValues The values used for input completion |
|
| 38 | + * |
|
| 39 | + * @throws InvalidArgumentException When argument mode is not valid |
|
| 40 | + */ |
|
| 41 | + public function __construct(string $name, ?int $mode = null, string $description = '', string|bool|int|float|array|null $default = null, \Closure|array $suggestedValues = []) |
|
| 42 | + { |
|
| 43 | + } |
|
| 44 | 44 | |
| 45 | - /** |
|
| 46 | - * Returns the argument name. |
|
| 47 | - */ |
|
| 48 | - public function getName(): string |
|
| 49 | - { |
|
| 50 | - } |
|
| 45 | + /** |
|
| 46 | + * Returns the argument name. |
|
| 47 | + */ |
|
| 48 | + public function getName(): string |
|
| 49 | + { |
|
| 50 | + } |
|
| 51 | 51 | |
| 52 | - /** |
|
| 53 | - * Returns true if the argument is required. |
|
| 54 | - * |
|
| 55 | - * @return bool true if parameter mode is self::REQUIRED, false otherwise |
|
| 56 | - */ |
|
| 57 | - public function isRequired(): bool |
|
| 58 | - { |
|
| 59 | - } |
|
| 52 | + /** |
|
| 53 | + * Returns true if the argument is required. |
|
| 54 | + * |
|
| 55 | + * @return bool true if parameter mode is self::REQUIRED, false otherwise |
|
| 56 | + */ |
|
| 57 | + public function isRequired(): bool |
|
| 58 | + { |
|
| 59 | + } |
|
| 60 | 60 | |
| 61 | - /** |
|
| 62 | - * Returns true if the argument can take multiple values. |
|
| 63 | - * |
|
| 64 | - * @return bool true if mode is self::IS_ARRAY, false otherwise |
|
| 65 | - */ |
|
| 66 | - public function isArray(): bool |
|
| 67 | - { |
|
| 68 | - } |
|
| 61 | + /** |
|
| 62 | + * Returns true if the argument can take multiple values. |
|
| 63 | + * |
|
| 64 | + * @return bool true if mode is self::IS_ARRAY, false otherwise |
|
| 65 | + */ |
|
| 66 | + public function isArray(): bool |
|
| 67 | + { |
|
| 68 | + } |
|
| 69 | 69 | |
| 70 | - /** |
|
| 71 | - * Sets the default value. |
|
| 72 | - * |
|
| 73 | - * @return void |
|
| 74 | - * |
|
| 75 | - * @throws LogicException When incorrect default value is given |
|
| 76 | - */ |
|
| 77 | - public function setDefault(string|bool|int|float|array|null $default = null) |
|
| 78 | - { |
|
| 79 | - } |
|
| 70 | + /** |
|
| 71 | + * Sets the default value. |
|
| 72 | + * |
|
| 73 | + * @return void |
|
| 74 | + * |
|
| 75 | + * @throws LogicException When incorrect default value is given |
|
| 76 | + */ |
|
| 77 | + public function setDefault(string|bool|int|float|array|null $default = null) |
|
| 78 | + { |
|
| 79 | + } |
|
| 80 | 80 | |
| 81 | - /** |
|
| 82 | - * Returns the default value. |
|
| 83 | - */ |
|
| 84 | - public function getDefault(): string|bool|int|float|array|null |
|
| 85 | - { |
|
| 86 | - } |
|
| 81 | + /** |
|
| 82 | + * Returns the default value. |
|
| 83 | + */ |
|
| 84 | + public function getDefault(): string|bool|int|float|array|null |
|
| 85 | + { |
|
| 86 | + } |
|
| 87 | 87 | |
| 88 | - public function hasCompletion(): bool |
|
| 89 | - { |
|
| 90 | - } |
|
| 88 | + public function hasCompletion(): bool |
|
| 89 | + { |
|
| 90 | + } |
|
| 91 | 91 | |
| 92 | - /** |
|
| 93 | - * Adds suggestions to $suggestions for the current completion input. |
|
| 94 | - * |
|
| 95 | - * @see Command::complete() |
|
| 96 | - */ |
|
| 97 | - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void |
|
| 98 | - { |
|
| 99 | - } |
|
| 92 | + /** |
|
| 93 | + * Adds suggestions to $suggestions for the current completion input. |
|
| 94 | + * |
|
| 95 | + * @see Command::complete() |
|
| 96 | + */ |
|
| 97 | + public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void |
|
| 98 | + { |
|
| 99 | + } |
|
| 100 | 100 | |
| 101 | - /** |
|
| 102 | - * Returns the description text. |
|
| 103 | - */ |
|
| 104 | - public function getDescription(): string |
|
| 105 | - { |
|
| 106 | - } |
|
| 101 | + /** |
|
| 102 | + * Returns the description text. |
|
| 103 | + */ |
|
| 104 | + public function getDescription(): string |
|
| 105 | + { |
|
| 106 | + } |
|
| 107 | 107 | } |
@@ -29,67 +29,67 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface |
| 31 | 31 | { |
| 32 | - /** |
|
| 33 | - * @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface) |
|
| 34 | - * @param bool|null $decorated Whether to decorate messages (null for auto-guessing) |
|
| 35 | - * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter) |
|
| 36 | - */ |
|
| 37 | - public function __construct(int $verbosity = self::VERBOSITY_NORMAL, ?bool $decorated = null, ?OutputFormatterInterface $formatter = null) |
|
| 38 | - { |
|
| 39 | - } |
|
| 32 | + /** |
|
| 33 | + * @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface) |
|
| 34 | + * @param bool|null $decorated Whether to decorate messages (null for auto-guessing) |
|
| 35 | + * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter) |
|
| 36 | + */ |
|
| 37 | + public function __construct(int $verbosity = self::VERBOSITY_NORMAL, ?bool $decorated = null, ?OutputFormatterInterface $formatter = null) |
|
| 38 | + { |
|
| 39 | + } |
|
| 40 | 40 | |
| 41 | - /** |
|
| 42 | - * Creates a new output section. |
|
| 43 | - */ |
|
| 44 | - public function section(): ConsoleSectionOutput |
|
| 45 | - { |
|
| 46 | - } |
|
| 41 | + /** |
|
| 42 | + * Creates a new output section. |
|
| 43 | + */ |
|
| 44 | + public function section(): ConsoleSectionOutput |
|
| 45 | + { |
|
| 46 | + } |
|
| 47 | 47 | |
| 48 | - /** |
|
| 49 | - * @return void |
|
| 50 | - */ |
|
| 51 | - public function setDecorated(bool $decorated) |
|
| 52 | - { |
|
| 53 | - } |
|
| 48 | + /** |
|
| 49 | + * @return void |
|
| 50 | + */ |
|
| 51 | + public function setDecorated(bool $decorated) |
|
| 52 | + { |
|
| 53 | + } |
|
| 54 | 54 | |
| 55 | - /** |
|
| 56 | - * @return void |
|
| 57 | - */ |
|
| 58 | - public function setFormatter(OutputFormatterInterface $formatter) |
|
| 59 | - { |
|
| 60 | - } |
|
| 55 | + /** |
|
| 56 | + * @return void |
|
| 57 | + */ |
|
| 58 | + public function setFormatter(OutputFormatterInterface $formatter) |
|
| 59 | + { |
|
| 60 | + } |
|
| 61 | 61 | |
| 62 | - /** |
|
| 63 | - * @return void |
|
| 64 | - */ |
|
| 65 | - public function setVerbosity(int $level) |
|
| 66 | - { |
|
| 67 | - } |
|
| 62 | + /** |
|
| 63 | + * @return void |
|
| 64 | + */ |
|
| 65 | + public function setVerbosity(int $level) |
|
| 66 | + { |
|
| 67 | + } |
|
| 68 | 68 | |
| 69 | - public function getErrorOutput(): OutputInterface |
|
| 70 | - { |
|
| 71 | - } |
|
| 69 | + public function getErrorOutput(): OutputInterface |
|
| 70 | + { |
|
| 71 | + } |
|
| 72 | 72 | |
| 73 | - /** |
|
| 74 | - * @return void |
|
| 75 | - */ |
|
| 76 | - public function setErrorOutput(OutputInterface $error) |
|
| 77 | - { |
|
| 78 | - } |
|
| 73 | + /** |
|
| 74 | + * @return void |
|
| 75 | + */ |
|
| 76 | + public function setErrorOutput(OutputInterface $error) |
|
| 77 | + { |
|
| 78 | + } |
|
| 79 | 79 | |
| 80 | - /** |
|
| 81 | - * Returns true if current environment supports writing console output to |
|
| 82 | - * STDOUT. |
|
| 83 | - */ |
|
| 84 | - protected function hasStdoutSupport(): bool |
|
| 85 | - { |
|
| 86 | - } |
|
| 80 | + /** |
|
| 81 | + * Returns true if current environment supports writing console output to |
|
| 82 | + * STDOUT. |
|
| 83 | + */ |
|
| 84 | + protected function hasStdoutSupport(): bool |
|
| 85 | + { |
|
| 86 | + } |
|
| 87 | 87 | |
| 88 | - /** |
|
| 89 | - * Returns true if current environment supports writing console output to |
|
| 90 | - * STDERR. |
|
| 91 | - */ |
|
| 92 | - protected function hasStderrSupport(): bool |
|
| 93 | - { |
|
| 94 | - } |
|
| 88 | + /** |
|
| 89 | + * Returns true if current environment supports writing console output to |
|
| 90 | + * STDERR. |
|
| 91 | + */ |
|
| 92 | + protected function hasStderrSupport(): bool |
|
| 93 | + { |
|
| 94 | + } |
|
| 95 | 95 | } |
@@ -24,157 +24,157 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | interface InputInterface |
| 26 | 26 | { |
| 27 | - /** |
|
| 28 | - * Returns the first argument from the raw parameters (not parsed). |
|
| 29 | - */ |
|
| 30 | - public function getFirstArgument(): ?string |
|
| 31 | - { |
|
| 32 | - } |
|
| 33 | - |
|
| 34 | - /** |
|
| 35 | - * Returns true if the raw parameters (not parsed) contain a value. |
|
| 36 | - * |
|
| 37 | - * This method is to be used to introspect the input parameters |
|
| 38 | - * before they have been validated. It must be used carefully. |
|
| 39 | - * Does not necessarily return the correct result for short options |
|
| 40 | - * when multiple flags are combined in the same option. |
|
| 41 | - * |
|
| 42 | - * @param string|array $values The values to look for in the raw parameters (can be an array) |
|
| 43 | - * @param bool $onlyParams Only check real parameters, skip those following an end of options (--) signal |
|
| 44 | - */ |
|
| 45 | - public function hasParameterOption(string|array $values, bool $onlyParams = false): bool |
|
| 46 | - { |
|
| 47 | - } |
|
| 48 | - |
|
| 49 | - /** |
|
| 50 | - * Returns the value of a raw option (not parsed). |
|
| 51 | - * |
|
| 52 | - * This method is to be used to introspect the input parameters |
|
| 53 | - * before they have been validated. It must be used carefully. |
|
| 54 | - * Does not necessarily return the correct result for short options |
|
| 55 | - * when multiple flags are combined in the same option. |
|
| 56 | - * |
|
| 57 | - * @param string|array $values The value(s) to look for in the raw parameters (can be an array) |
|
| 58 | - * @param string|bool|int|float|array|null $default The default value to return if no result is found |
|
| 59 | - * @param bool $onlyParams Only check real parameters, skip those following an end of options (--) signal |
|
| 60 | - * |
|
| 61 | - * @return mixed |
|
| 62 | - */ |
|
| 63 | - public function getParameterOption(string|array $values, string|bool|int|float|array|null $default = false, bool $onlyParams = false) |
|
| 64 | - { |
|
| 65 | - } |
|
| 66 | - |
|
| 67 | - /** |
|
| 68 | - * Binds the current Input instance with the given arguments and options. |
|
| 69 | - * |
|
| 70 | - * @return void |
|
| 71 | - * |
|
| 72 | - * @throws RuntimeException |
|
| 73 | - */ |
|
| 74 | - public function bind(InputDefinition $definition) |
|
| 75 | - { |
|
| 76 | - } |
|
| 77 | - |
|
| 78 | - /** |
|
| 79 | - * Validates the input. |
|
| 80 | - * |
|
| 81 | - * @return void |
|
| 82 | - * |
|
| 83 | - * @throws RuntimeException When not enough arguments are given |
|
| 84 | - */ |
|
| 85 | - public function validate() |
|
| 86 | - { |
|
| 87 | - } |
|
| 88 | - |
|
| 89 | - /** |
|
| 90 | - * Returns all the given arguments merged with the default values. |
|
| 91 | - * |
|
| 92 | - * @return array<string|bool|int|float|array|null> |
|
| 93 | - */ |
|
| 94 | - public function getArguments(): array |
|
| 95 | - { |
|
| 96 | - } |
|
| 97 | - |
|
| 98 | - /** |
|
| 99 | - * Returns the argument value for a given argument name. |
|
| 100 | - * |
|
| 101 | - * @return mixed |
|
| 102 | - * |
|
| 103 | - * @throws InvalidArgumentException When argument given doesn't exist |
|
| 104 | - */ |
|
| 105 | - public function getArgument(string $name) |
|
| 106 | - { |
|
| 107 | - } |
|
| 108 | - |
|
| 109 | - /** |
|
| 110 | - * Sets an argument value by name. |
|
| 111 | - * |
|
| 112 | - * @return void |
|
| 113 | - * |
|
| 114 | - * @throws InvalidArgumentException When argument given doesn't exist |
|
| 115 | - */ |
|
| 116 | - public function setArgument(string $name, mixed $value) |
|
| 117 | - { |
|
| 118 | - } |
|
| 119 | - |
|
| 120 | - /** |
|
| 121 | - * Returns true if an InputArgument object exists by name or position. |
|
| 122 | - */ |
|
| 123 | - public function hasArgument(string $name): bool |
|
| 124 | - { |
|
| 125 | - } |
|
| 126 | - |
|
| 127 | - /** |
|
| 128 | - * Returns all the given options merged with the default values. |
|
| 129 | - * |
|
| 130 | - * @return array<string|bool|int|float|array|null> |
|
| 131 | - */ |
|
| 132 | - public function getOptions(): array |
|
| 133 | - { |
|
| 134 | - } |
|
| 135 | - |
|
| 136 | - /** |
|
| 137 | - * Returns the option value for a given option name. |
|
| 138 | - * |
|
| 139 | - * @return mixed |
|
| 140 | - * |
|
| 141 | - * @throws InvalidArgumentException When option given doesn't exist |
|
| 142 | - */ |
|
| 143 | - public function getOption(string $name) |
|
| 144 | - { |
|
| 145 | - } |
|
| 146 | - |
|
| 147 | - /** |
|
| 148 | - * Sets an option value by name. |
|
| 149 | - * |
|
| 150 | - * @return void |
|
| 151 | - * |
|
| 152 | - * @throws InvalidArgumentException When option given doesn't exist |
|
| 153 | - */ |
|
| 154 | - public function setOption(string $name, mixed $value) |
|
| 155 | - { |
|
| 156 | - } |
|
| 157 | - |
|
| 158 | - /** |
|
| 159 | - * Returns true if an InputOption object exists by name. |
|
| 160 | - */ |
|
| 161 | - public function hasOption(string $name): bool |
|
| 162 | - { |
|
| 163 | - } |
|
| 164 | - |
|
| 165 | - /** |
|
| 166 | - * Is this input means interactive? |
|
| 167 | - */ |
|
| 168 | - public function isInteractive(): bool |
|
| 169 | - { |
|
| 170 | - } |
|
| 171 | - |
|
| 172 | - /** |
|
| 173 | - * Sets the input interactivity. |
|
| 174 | - * |
|
| 175 | - * @return void |
|
| 176 | - */ |
|
| 177 | - public function setInteractive(bool $interactive) |
|
| 178 | - { |
|
| 179 | - } |
|
| 27 | + /** |
|
| 28 | + * Returns the first argument from the raw parameters (not parsed). |
|
| 29 | + */ |
|
| 30 | + public function getFirstArgument(): ?string |
|
| 31 | + { |
|
| 32 | + } |
|
| 33 | + |
|
| 34 | + /** |
|
| 35 | + * Returns true if the raw parameters (not parsed) contain a value. |
|
| 36 | + * |
|
| 37 | + * This method is to be used to introspect the input parameters |
|
| 38 | + * before they have been validated. It must be used carefully. |
|
| 39 | + * Does not necessarily return the correct result for short options |
|
| 40 | + * when multiple flags are combined in the same option. |
|
| 41 | + * |
|
| 42 | + * @param string|array $values The values to look for in the raw parameters (can be an array) |
|
| 43 | + * @param bool $onlyParams Only check real parameters, skip those following an end of options (--) signal |
|
| 44 | + */ |
|
| 45 | + public function hasParameterOption(string|array $values, bool $onlyParams = false): bool |
|
| 46 | + { |
|
| 47 | + } |
|
| 48 | + |
|
| 49 | + /** |
|
| 50 | + * Returns the value of a raw option (not parsed). |
|
| 51 | + * |
|
| 52 | + * This method is to be used to introspect the input parameters |
|
| 53 | + * before they have been validated. It must be used carefully. |
|
| 54 | + * Does not necessarily return the correct result for short options |
|
| 55 | + * when multiple flags are combined in the same option. |
|
| 56 | + * |
|
| 57 | + * @param string|array $values The value(s) to look for in the raw parameters (can be an array) |
|
| 58 | + * @param string|bool|int|float|array|null $default The default value to return if no result is found |
|
| 59 | + * @param bool $onlyParams Only check real parameters, skip those following an end of options (--) signal |
|
| 60 | + * |
|
| 61 | + * @return mixed |
|
| 62 | + */ |
|
| 63 | + public function getParameterOption(string|array $values, string|bool|int|float|array|null $default = false, bool $onlyParams = false) |
|
| 64 | + { |
|
| 65 | + } |
|
| 66 | + |
|
| 67 | + /** |
|
| 68 | + * Binds the current Input instance with the given arguments and options. |
|
| 69 | + * |
|
| 70 | + * @return void |
|
| 71 | + * |
|
| 72 | + * @throws RuntimeException |
|
| 73 | + */ |
|
| 74 | + public function bind(InputDefinition $definition) |
|
| 75 | + { |
|
| 76 | + } |
|
| 77 | + |
|
| 78 | + /** |
|
| 79 | + * Validates the input. |
|
| 80 | + * |
|
| 81 | + * @return void |
|
| 82 | + * |
|
| 83 | + * @throws RuntimeException When not enough arguments are given |
|
| 84 | + */ |
|
| 85 | + public function validate() |
|
| 86 | + { |
|
| 87 | + } |
|
| 88 | + |
|
| 89 | + /** |
|
| 90 | + * Returns all the given arguments merged with the default values. |
|
| 91 | + * |
|
| 92 | + * @return array<string|bool|int|float|array|null> |
|
| 93 | + */ |
|
| 94 | + public function getArguments(): array |
|
| 95 | + { |
|
| 96 | + } |
|
| 97 | + |
|
| 98 | + /** |
|
| 99 | + * Returns the argument value for a given argument name. |
|
| 100 | + * |
|
| 101 | + * @return mixed |
|
| 102 | + * |
|
| 103 | + * @throws InvalidArgumentException When argument given doesn't exist |
|
| 104 | + */ |
|
| 105 | + public function getArgument(string $name) |
|
| 106 | + { |
|
| 107 | + } |
|
| 108 | + |
|
| 109 | + /** |
|
| 110 | + * Sets an argument value by name. |
|
| 111 | + * |
|
| 112 | + * @return void |
|
| 113 | + * |
|
| 114 | + * @throws InvalidArgumentException When argument given doesn't exist |
|
| 115 | + */ |
|
| 116 | + public function setArgument(string $name, mixed $value) |
|
| 117 | + { |
|
| 118 | + } |
|
| 119 | + |
|
| 120 | + /** |
|
| 121 | + * Returns true if an InputArgument object exists by name or position. |
|
| 122 | + */ |
|
| 123 | + public function hasArgument(string $name): bool |
|
| 124 | + { |
|
| 125 | + } |
|
| 126 | + |
|
| 127 | + /** |
|
| 128 | + * Returns all the given options merged with the default values. |
|
| 129 | + * |
|
| 130 | + * @return array<string|bool|int|float|array|null> |
|
| 131 | + */ |
|
| 132 | + public function getOptions(): array |
|
| 133 | + { |
|
| 134 | + } |
|
| 135 | + |
|
| 136 | + /** |
|
| 137 | + * Returns the option value for a given option name. |
|
| 138 | + * |
|
| 139 | + * @return mixed |
|
| 140 | + * |
|
| 141 | + * @throws InvalidArgumentException When option given doesn't exist |
|
| 142 | + */ |
|
| 143 | + public function getOption(string $name) |
|
| 144 | + { |
|
| 145 | + } |
|
| 146 | + |
|
| 147 | + /** |
|
| 148 | + * Sets an option value by name. |
|
| 149 | + * |
|
| 150 | + * @return void |
|
| 151 | + * |
|
| 152 | + * @throws InvalidArgumentException When option given doesn't exist |
|
| 153 | + */ |
|
| 154 | + public function setOption(string $name, mixed $value) |
|
| 155 | + { |
|
| 156 | + } |
|
| 157 | + |
|
| 158 | + /** |
|
| 159 | + * Returns true if an InputOption object exists by name. |
|
| 160 | + */ |
|
| 161 | + public function hasOption(string $name): bool |
|
| 162 | + { |
|
| 163 | + } |
|
| 164 | + |
|
| 165 | + /** |
|
| 166 | + * Is this input means interactive? |
|
| 167 | + */ |
|
| 168 | + public function isInteractive(): bool |
|
| 169 | + { |
|
| 170 | + } |
|
| 171 | + |
|
| 172 | + /** |
|
| 173 | + * Sets the input interactivity. |
|
| 174 | + * |
|
| 175 | + * @return void |
|
| 176 | + */ |
|
| 177 | + public function setInteractive(bool $interactive) |
|
| 178 | + { |
|
| 179 | + } |
|
| 180 | 180 | } |
@@ -21,60 +21,60 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | abstract class Helper implements HelperInterface |
| 23 | 23 | { |
| 24 | - protected $helperSet; |
|
| 24 | + protected $helperSet; |
|
| 25 | 25 | |
| 26 | - /** |
|
| 27 | - * @return void |
|
| 28 | - */ |
|
| 29 | - public function setHelperSet(?HelperSet $helperSet = null) |
|
| 30 | - { |
|
| 31 | - } |
|
| 26 | + /** |
|
| 27 | + * @return void |
|
| 28 | + */ |
|
| 29 | + public function setHelperSet(?HelperSet $helperSet = null) |
|
| 30 | + { |
|
| 31 | + } |
|
| 32 | 32 | |
| 33 | - public function getHelperSet(): ?HelperSet |
|
| 34 | - { |
|
| 35 | - } |
|
| 33 | + public function getHelperSet(): ?HelperSet |
|
| 34 | + { |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | - /** |
|
| 38 | - * Returns the width of a string, using mb_strwidth if it is available. |
|
| 39 | - * The width is how many characters positions the string will use. |
|
| 40 | - */ |
|
| 41 | - public static function width(?string $string): int |
|
| 42 | - { |
|
| 43 | - } |
|
| 37 | + /** |
|
| 38 | + * Returns the width of a string, using mb_strwidth if it is available. |
|
| 39 | + * The width is how many characters positions the string will use. |
|
| 40 | + */ |
|
| 41 | + public static function width(?string $string): int |
|
| 42 | + { |
|
| 43 | + } |
|
| 44 | 44 | |
| 45 | - /** |
|
| 46 | - * Returns the length of a string, using mb_strlen if it is available. |
|
| 47 | - * The length is related to how many bytes the string will use. |
|
| 48 | - */ |
|
| 49 | - public static function length(?string $string): int |
|
| 50 | - { |
|
| 51 | - } |
|
| 45 | + /** |
|
| 46 | + * Returns the length of a string, using mb_strlen if it is available. |
|
| 47 | + * The length is related to how many bytes the string will use. |
|
| 48 | + */ |
|
| 49 | + public static function length(?string $string): int |
|
| 50 | + { |
|
| 51 | + } |
|
| 52 | 52 | |
| 53 | - /** |
|
| 54 | - * Returns the subset of a string, using mb_substr if it is available. |
|
| 55 | - */ |
|
| 56 | - public static function substr(?string $string, int $from, ?int $length = null): string |
|
| 57 | - { |
|
| 58 | - } |
|
| 53 | + /** |
|
| 54 | + * Returns the subset of a string, using mb_substr if it is available. |
|
| 55 | + */ |
|
| 56 | + public static function substr(?string $string, int $from, ?int $length = null): string |
|
| 57 | + { |
|
| 58 | + } |
|
| 59 | 59 | |
| 60 | - /** |
|
| 61 | - * @return string |
|
| 62 | - */ |
|
| 63 | - public static function formatTime(int|float $secs, int $precision = 1) |
|
| 64 | - { |
|
| 65 | - } |
|
| 60 | + /** |
|
| 61 | + * @return string |
|
| 62 | + */ |
|
| 63 | + public static function formatTime(int|float $secs, int $precision = 1) |
|
| 64 | + { |
|
| 65 | + } |
|
| 66 | 66 | |
| 67 | - /** |
|
| 68 | - * @return string |
|
| 69 | - */ |
|
| 70 | - public static function formatMemory(int $memory) |
|
| 71 | - { |
|
| 72 | - } |
|
| 67 | + /** |
|
| 68 | + * @return string |
|
| 69 | + */ |
|
| 70 | + public static function formatMemory(int $memory) |
|
| 71 | + { |
|
| 72 | + } |
|
| 73 | 73 | |
| 74 | - /** |
|
| 75 | - * @return string |
|
| 76 | - */ |
|
| 77 | - public static function removeDecoration(OutputFormatterInterface $formatter, ?string $string) |
|
| 78 | - { |
|
| 79 | - } |
|
| 74 | + /** |
|
| 75 | + * @return string |
|
| 76 | + */ |
|
| 77 | + public static function removeDecoration(OutputFormatterInterface $formatter, ?string $string) |
|
| 78 | + { |
|
| 79 | + } |
|
| 80 | 80 | } |
@@ -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 | } |
@@ -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 | } |