Exception
2 years ago
Visitor
9 months ago
AbstractAsset.php
2 years ago
AbstractSchemaManager.php
9 months ago
Column.php
2 years ago
ColumnDiff.php
2 years ago
Comparator.php
2 years ago
Constraint.php
2 years ago
DB2SchemaManager.php
2 years ago
DefaultSchemaManagerFactory.php
2 years ago
ForeignKeyConstraint.php
9 months ago
Identifier.php
2 years ago
Index.php
2 years ago
LegacySchemaManagerFactory.php
2 years ago
MySQLSchemaManager.php
9 months ago
OracleSchemaManager.php
2 years ago
PostgreSQLSchemaManager.php
9 months ago
SQLServerSchemaManager.php
9 months ago
Schema.php
2 years ago
SchemaConfig.php
2 years ago
SchemaDiff.php
2 years ago
SchemaException.php
2 years ago
SchemaManagerFactory.php
2 years ago
Sequence.php
2 years ago
SqliteSchemaManager.php
8 months ago
Table.php
2 years ago
TableDiff.php
2 years ago
UniqueConstraint.php
2 years ago
View.php
2 years ago
Table.php
456 lines
| 1 | <?php |
| 2 | namespace MailPoetVendor\Doctrine\DBAL\Schema; |
| 3 | if (!defined('ABSPATH')) exit; |
| 4 | use MailPoetVendor\Doctrine\DBAL\Exception; |
| 5 | use MailPoetVendor\Doctrine\DBAL\Schema\Exception\InvalidTableName; |
| 6 | use MailPoetVendor\Doctrine\DBAL\Schema\Visitor\Visitor; |
| 7 | use MailPoetVendor\Doctrine\DBAL\Types\Type; |
| 8 | use MailPoetVendor\Doctrine\Deprecations\Deprecation; |
| 9 | use function array_filter; |
| 10 | use function array_keys; |
| 11 | use function array_merge; |
| 12 | use function in_array; |
| 13 | use function preg_match; |
| 14 | use function strlen; |
| 15 | use function strtolower; |
| 16 | use const ARRAY_FILTER_USE_KEY; |
| 17 | class Table extends AbstractAsset |
| 18 | { |
| 19 | protected $_columns = []; |
| 20 | protected $_indexes = []; |
| 21 | protected $_primaryKeyName; |
| 22 | protected $uniqueConstraints = []; |
| 23 | protected $_fkConstraints = []; |
| 24 | protected $_options = ['create_options' => []]; |
| 25 | protected $_schemaConfig; |
| 26 | private array $implicitIndexes = []; |
| 27 | public function __construct(string $name, array $columns = [], array $indexes = [], array $uniqueConstraints = [], array $fkConstraints = [], array $options = []) |
| 28 | { |
| 29 | if ($name === '') { |
| 30 | throw InvalidTableName::new($name); |
| 31 | } |
| 32 | $this->_setName($name); |
| 33 | foreach ($columns as $column) { |
| 34 | $this->_addColumn($column); |
| 35 | } |
| 36 | foreach ($indexes as $idx) { |
| 37 | $this->_addIndex($idx); |
| 38 | } |
| 39 | foreach ($uniqueConstraints as $uniqueConstraint) { |
| 40 | $this->_addUniqueConstraint($uniqueConstraint); |
| 41 | } |
| 42 | foreach ($fkConstraints as $constraint) { |
| 43 | $this->_addForeignKeyConstraint($constraint); |
| 44 | } |
| 45 | $this->_options = array_merge($this->_options, $options); |
| 46 | } |
| 47 | public function setSchemaConfig(SchemaConfig $schemaConfig) |
| 48 | { |
| 49 | $this->_schemaConfig = $schemaConfig; |
| 50 | } |
| 51 | protected function _getMaxIdentifierLength() |
| 52 | { |
| 53 | if ($this->_schemaConfig instanceof SchemaConfig) { |
| 54 | return $this->_schemaConfig->getMaxIdentifierLength(); |
| 55 | } |
| 56 | return 63; |
| 57 | } |
| 58 | public function setPrimaryKey(array $columnNames, $indexName = \false) |
| 59 | { |
| 60 | if ($indexName === \false) { |
| 61 | $indexName = 'primary'; |
| 62 | } |
| 63 | $this->_addIndex($this->_createIndex($columnNames, $indexName, \true, \true)); |
| 64 | foreach ($columnNames as $columnName) { |
| 65 | $column = $this->getColumn($columnName); |
| 66 | $column->setNotnull(\true); |
| 67 | } |
| 68 | return $this; |
| 69 | } |
| 70 | public function addIndex(array $columnNames, ?string $indexName = null, array $flags = [], array $options = []) |
| 71 | { |
| 72 | $indexName ??= $this->_generateIdentifierName(array_merge([$this->getName()], $columnNames), 'idx', $this->_getMaxIdentifierLength()); |
| 73 | return $this->_addIndex($this->_createIndex($columnNames, $indexName, \false, \false, $flags, $options)); |
| 74 | } |
| 75 | public function addUniqueConstraint(array $columnNames, ?string $indexName = null, array $flags = [], array $options = []) : Table |
| 76 | { |
| 77 | $indexName ??= $this->_generateIdentifierName(array_merge([$this->getName()], $columnNames), 'uniq', $this->_getMaxIdentifierLength()); |
| 78 | return $this->_addUniqueConstraint($this->_createUniqueConstraint($columnNames, $indexName, $flags, $options)); |
| 79 | } |
| 80 | public function dropPrimaryKey() |
| 81 | { |
| 82 | if ($this->_primaryKeyName === null) { |
| 83 | return; |
| 84 | } |
| 85 | $this->dropIndex($this->_primaryKeyName); |
| 86 | $this->_primaryKeyName = null; |
| 87 | } |
| 88 | public function dropIndex($name) |
| 89 | { |
| 90 | $name = $this->normalizeIdentifier($name); |
| 91 | if (!$this->hasIndex($name)) { |
| 92 | throw SchemaException::indexDoesNotExist($name, $this->_name); |
| 93 | } |
| 94 | unset($this->_indexes[$name]); |
| 95 | } |
| 96 | public function addUniqueIndex(array $columnNames, $indexName = null, array $options = []) |
| 97 | { |
| 98 | $indexName ??= $this->_generateIdentifierName(array_merge([$this->getName()], $columnNames), 'uniq', $this->_getMaxIdentifierLength()); |
| 99 | return $this->_addIndex($this->_createIndex($columnNames, $indexName, \true, \false, [], $options)); |
| 100 | } |
| 101 | public function renameIndex($oldName, $newName = null) |
| 102 | { |
| 103 | $oldName = $this->normalizeIdentifier($oldName); |
| 104 | $normalizedNewName = $this->normalizeIdentifier($newName); |
| 105 | if ($oldName === $normalizedNewName) { |
| 106 | return $this; |
| 107 | } |
| 108 | if (!$this->hasIndex($oldName)) { |
| 109 | throw SchemaException::indexDoesNotExist($oldName, $this->_name); |
| 110 | } |
| 111 | if ($this->hasIndex($normalizedNewName)) { |
| 112 | throw SchemaException::indexAlreadyExists($normalizedNewName, $this->_name); |
| 113 | } |
| 114 | $oldIndex = $this->_indexes[$oldName]; |
| 115 | if ($oldIndex->isPrimary()) { |
| 116 | $this->dropPrimaryKey(); |
| 117 | return $this->setPrimaryKey($oldIndex->getColumns(), $newName ?? \false); |
| 118 | } |
| 119 | unset($this->_indexes[$oldName]); |
| 120 | if ($oldIndex->isUnique()) { |
| 121 | return $this->addUniqueIndex($oldIndex->getColumns(), $newName, $oldIndex->getOptions()); |
| 122 | } |
| 123 | return $this->addIndex($oldIndex->getColumns(), $newName, $oldIndex->getFlags(), $oldIndex->getOptions()); |
| 124 | } |
| 125 | public function columnsAreIndexed(array $columnNames) |
| 126 | { |
| 127 | foreach ($this->getIndexes() as $index) { |
| 128 | if ($index->spansColumns($columnNames)) { |
| 129 | return \true; |
| 130 | } |
| 131 | } |
| 132 | return \false; |
| 133 | } |
| 134 | private function _createIndex(array $columnNames, $indexName, $isUnique, $isPrimary, array $flags = [], array $options = []) : Index |
| 135 | { |
| 136 | if (preg_match('(([^a-zA-Z0-9_]+))', $this->normalizeIdentifier($indexName)) === 1) { |
| 137 | throw SchemaException::indexNameInvalid($indexName); |
| 138 | } |
| 139 | foreach ($columnNames as $columnName) { |
| 140 | if (!$this->hasColumn($columnName)) { |
| 141 | throw SchemaException::columnDoesNotExist($columnName, $this->_name); |
| 142 | } |
| 143 | } |
| 144 | return new Index($indexName, $columnNames, $isUnique, $isPrimary, $flags, $options); |
| 145 | } |
| 146 | public function addColumn($name, $typeName, array $options = []) |
| 147 | { |
| 148 | $column = new Column($name, Type::getType($typeName), $options); |
| 149 | $this->_addColumn($column); |
| 150 | return $column; |
| 151 | } |
| 152 | public function changeColumn($name, array $options) |
| 153 | { |
| 154 | Deprecation::trigger('doctrine/dbal', 'https://github.com/doctrine/dbal/pull/5747', '%s is deprecated. Use modifyColumn() instead.', __METHOD__); |
| 155 | return $this->modifyColumn($name, $options); |
| 156 | } |
| 157 | public function modifyColumn($name, array $options) |
| 158 | { |
| 159 | $column = $this->getColumn($name); |
| 160 | $column->setOptions($options); |
| 161 | return $this; |
| 162 | } |
| 163 | public function dropColumn($name) |
| 164 | { |
| 165 | $name = $this->normalizeIdentifier($name); |
| 166 | unset($this->_columns[$name]); |
| 167 | return $this; |
| 168 | } |
| 169 | public function addForeignKeyConstraint($foreignTable, array $localColumnNames, array $foreignColumnNames, array $options = [], $name = null) |
| 170 | { |
| 171 | $name ??= $this->_generateIdentifierName(array_merge([$this->getName()], $localColumnNames), 'fk', $this->_getMaxIdentifierLength()); |
| 172 | if ($foreignTable instanceof Table) { |
| 173 | foreach ($foreignColumnNames as $columnName) { |
| 174 | if (!$foreignTable->hasColumn($columnName)) { |
| 175 | throw SchemaException::columnDoesNotExist($columnName, $foreignTable->getName()); |
| 176 | } |
| 177 | } |
| 178 | } |
| 179 | foreach ($localColumnNames as $columnName) { |
| 180 | if (!$this->hasColumn($columnName)) { |
| 181 | throw SchemaException::columnDoesNotExist($columnName, $this->_name); |
| 182 | } |
| 183 | } |
| 184 | $constraint = new ForeignKeyConstraint($localColumnNames, $foreignTable, $foreignColumnNames, $name, $options); |
| 185 | return $this->_addForeignKeyConstraint($constraint); |
| 186 | } |
| 187 | public function addOption($name, $value) |
| 188 | { |
| 189 | $this->_options[$name] = $value; |
| 190 | return $this; |
| 191 | } |
| 192 | protected function _addColumn(Column $column) |
| 193 | { |
| 194 | $columnName = $column->getName(); |
| 195 | $columnName = $this->normalizeIdentifier($columnName); |
| 196 | if (isset($this->_columns[$columnName])) { |
| 197 | throw SchemaException::columnAlreadyExists($this->getName(), $columnName); |
| 198 | } |
| 199 | $this->_columns[$columnName] = $column; |
| 200 | } |
| 201 | protected function _addIndex(Index $indexCandidate) |
| 202 | { |
| 203 | $indexName = $indexCandidate->getName(); |
| 204 | $indexName = $this->normalizeIdentifier($indexName); |
| 205 | $replacedImplicitIndexes = []; |
| 206 | foreach ($this->implicitIndexes as $name => $implicitIndex) { |
| 207 | if (!$implicitIndex->isFulfilledBy($indexCandidate) || !isset($this->_indexes[$name])) { |
| 208 | continue; |
| 209 | } |
| 210 | $replacedImplicitIndexes[] = $name; |
| 211 | } |
| 212 | if (isset($this->_indexes[$indexName]) && !in_array($indexName, $replacedImplicitIndexes, \true) || $this->_primaryKeyName !== null && $indexCandidate->isPrimary()) { |
| 213 | throw SchemaException::indexAlreadyExists($indexName, $this->_name); |
| 214 | } |
| 215 | foreach ($replacedImplicitIndexes as $name) { |
| 216 | unset($this->_indexes[$name], $this->implicitIndexes[$name]); |
| 217 | } |
| 218 | if ($indexCandidate->isPrimary()) { |
| 219 | $this->_primaryKeyName = $indexName; |
| 220 | } |
| 221 | $this->_indexes[$indexName] = $indexCandidate; |
| 222 | return $this; |
| 223 | } |
| 224 | protected function _addUniqueConstraint(UniqueConstraint $constraint) : Table |
| 225 | { |
| 226 | $mergedNames = array_merge([$this->getName()], $constraint->getColumns()); |
| 227 | $name = strlen($constraint->getName()) > 0 ? $constraint->getName() : $this->_generateIdentifierName($mergedNames, 'fk', $this->_getMaxIdentifierLength()); |
| 228 | $name = $this->normalizeIdentifier($name); |
| 229 | $this->uniqueConstraints[$name] = $constraint; |
| 230 | // If there is already an index that fulfills this requirements drop the request. In the case of __construct |
| 231 | // calling this method during hydration from schema-details all the explicitly added indexes lead to duplicates. |
| 232 | // This creates computation overhead in this case, however no duplicate indexes are ever added (column based). |
| 233 | $indexName = $this->_generateIdentifierName($mergedNames, 'idx', $this->_getMaxIdentifierLength()); |
| 234 | $indexCandidate = $this->_createIndex($constraint->getColumns(), $indexName, \true, \false); |
| 235 | foreach ($this->_indexes as $existingIndex) { |
| 236 | if ($indexCandidate->isFulfilledBy($existingIndex)) { |
| 237 | return $this; |
| 238 | } |
| 239 | } |
| 240 | $this->implicitIndexes[$this->normalizeIdentifier($indexName)] = $indexCandidate; |
| 241 | return $this; |
| 242 | } |
| 243 | protected function _addForeignKeyConstraint(ForeignKeyConstraint $constraint) |
| 244 | { |
| 245 | $constraint->setLocalTable($this); |
| 246 | if (strlen($constraint->getName()) > 0) { |
| 247 | $name = $constraint->getName(); |
| 248 | } else { |
| 249 | $name = $this->_generateIdentifierName(array_merge([$this->getName()], $constraint->getLocalColumns()), 'fk', $this->_getMaxIdentifierLength()); |
| 250 | } |
| 251 | $name = $this->normalizeIdentifier($name); |
| 252 | $this->_fkConstraints[$name] = $constraint; |
| 253 | $indexName = $this->_generateIdentifierName(array_merge([$this->getName()], $constraint->getColumns()), 'idx', $this->_getMaxIdentifierLength()); |
| 254 | $indexCandidate = $this->_createIndex($constraint->getColumns(), $indexName, \false, \false); |
| 255 | foreach ($this->_indexes as $existingIndex) { |
| 256 | if ($indexCandidate->isFulfilledBy($existingIndex)) { |
| 257 | return $this; |
| 258 | } |
| 259 | } |
| 260 | $this->_addIndex($indexCandidate); |
| 261 | $this->implicitIndexes[$this->normalizeIdentifier($indexName)] = $indexCandidate; |
| 262 | return $this; |
| 263 | } |
| 264 | public function hasForeignKey($name) |
| 265 | { |
| 266 | $name = $this->normalizeIdentifier($name); |
| 267 | return isset($this->_fkConstraints[$name]); |
| 268 | } |
| 269 | public function getForeignKey($name) |
| 270 | { |
| 271 | $name = $this->normalizeIdentifier($name); |
| 272 | if (!$this->hasForeignKey($name)) { |
| 273 | throw SchemaException::foreignKeyDoesNotExist($name, $this->_name); |
| 274 | } |
| 275 | return $this->_fkConstraints[$name]; |
| 276 | } |
| 277 | public function removeForeignKey($name) |
| 278 | { |
| 279 | $name = $this->normalizeIdentifier($name); |
| 280 | if (!$this->hasForeignKey($name)) { |
| 281 | throw SchemaException::foreignKeyDoesNotExist($name, $this->_name); |
| 282 | } |
| 283 | unset($this->_fkConstraints[$name]); |
| 284 | } |
| 285 | public function hasUniqueConstraint(string $name) : bool |
| 286 | { |
| 287 | $name = $this->normalizeIdentifier($name); |
| 288 | return isset($this->uniqueConstraints[$name]); |
| 289 | } |
| 290 | public function getUniqueConstraint(string $name) : UniqueConstraint |
| 291 | { |
| 292 | $name = $this->normalizeIdentifier($name); |
| 293 | if (!$this->hasUniqueConstraint($name)) { |
| 294 | throw SchemaException::uniqueConstraintDoesNotExist($name, $this->_name); |
| 295 | } |
| 296 | return $this->uniqueConstraints[$name]; |
| 297 | } |
| 298 | public function removeUniqueConstraint(string $name) : void |
| 299 | { |
| 300 | $name = $this->normalizeIdentifier($name); |
| 301 | if (!$this->hasUniqueConstraint($name)) { |
| 302 | throw SchemaException::uniqueConstraintDoesNotExist($name, $this->_name); |
| 303 | } |
| 304 | unset($this->uniqueConstraints[$name]); |
| 305 | } |
| 306 | public function getColumns() |
| 307 | { |
| 308 | $primaryKeyColumns = $this->getPrimaryKey() !== null ? $this->getPrimaryKeyColumns() : []; |
| 309 | $foreignKeyColumns = $this->getForeignKeyColumns(); |
| 310 | $remainderColumns = $this->filterColumns(array_merge(array_keys($primaryKeyColumns), array_keys($foreignKeyColumns)), \true); |
| 311 | return array_merge($primaryKeyColumns, $foreignKeyColumns, $remainderColumns); |
| 312 | } |
| 313 | public function getForeignKeyColumns() |
| 314 | { |
| 315 | Deprecation::triggerIfCalledFromOutside('doctrine/dbal', 'https://github.com/doctrine/dbal/pull/5731', '%s is deprecated. Use getForeignKey() and ForeignKeyConstraint::getLocalColumns() instead.', __METHOD__); |
| 316 | $foreignKeyColumns = []; |
| 317 | foreach ($this->getForeignKeys() as $foreignKey) { |
| 318 | $foreignKeyColumns = array_merge($foreignKeyColumns, $foreignKey->getLocalColumns()); |
| 319 | } |
| 320 | return $this->filterColumns($foreignKeyColumns); |
| 321 | } |
| 322 | private function filterColumns(array $columnNames, bool $reverse = \false) : array |
| 323 | { |
| 324 | return array_filter($this->_columns, static function (string $columnName) use($columnNames, $reverse) : bool { |
| 325 | return in_array($columnName, $columnNames, \true) !== $reverse; |
| 326 | }, ARRAY_FILTER_USE_KEY); |
| 327 | } |
| 328 | public function hasColumn($name) |
| 329 | { |
| 330 | $name = $this->normalizeIdentifier($name); |
| 331 | return isset($this->_columns[$name]); |
| 332 | } |
| 333 | public function getColumn($name) |
| 334 | { |
| 335 | $name = $this->normalizeIdentifier($name); |
| 336 | if (!$this->hasColumn($name)) { |
| 337 | throw SchemaException::columnDoesNotExist($name, $this->_name); |
| 338 | } |
| 339 | return $this->_columns[$name]; |
| 340 | } |
| 341 | public function getPrimaryKey() |
| 342 | { |
| 343 | if ($this->_primaryKeyName !== null) { |
| 344 | return $this->getIndex($this->_primaryKeyName); |
| 345 | } |
| 346 | return null; |
| 347 | } |
| 348 | public function getPrimaryKeyColumns() |
| 349 | { |
| 350 | Deprecation::triggerIfCalledFromOutside('doctrine/dbal', 'https://github.com/doctrine/dbal/pull/5731', '%s is deprecated. Use getPrimaryKey() and Index::getColumns() instead.', __METHOD__); |
| 351 | $primaryKey = $this->getPrimaryKey(); |
| 352 | if ($primaryKey === null) { |
| 353 | throw new Exception('Table ' . $this->getName() . ' has no primary key.'); |
| 354 | } |
| 355 | return $this->filterColumns($primaryKey->getColumns()); |
| 356 | } |
| 357 | public function hasPrimaryKey() |
| 358 | { |
| 359 | Deprecation::trigger('doctrine/dbal', 'https://github.com/doctrine/dbal/pull/5731', '%s is deprecated. Use getPrimaryKey() instead.', __METHOD__); |
| 360 | return $this->_primaryKeyName !== null && $this->hasIndex($this->_primaryKeyName); |
| 361 | } |
| 362 | public function hasIndex($name) |
| 363 | { |
| 364 | $name = $this->normalizeIdentifier($name); |
| 365 | return isset($this->_indexes[$name]); |
| 366 | } |
| 367 | public function getIndex($name) |
| 368 | { |
| 369 | $name = $this->normalizeIdentifier($name); |
| 370 | if (!$this->hasIndex($name)) { |
| 371 | throw SchemaException::indexDoesNotExist($name, $this->_name); |
| 372 | } |
| 373 | return $this->_indexes[$name]; |
| 374 | } |
| 375 | public function getIndexes() |
| 376 | { |
| 377 | return $this->_indexes; |
| 378 | } |
| 379 | public function getUniqueConstraints() : array |
| 380 | { |
| 381 | return $this->uniqueConstraints; |
| 382 | } |
| 383 | public function getForeignKeys() |
| 384 | { |
| 385 | return $this->_fkConstraints; |
| 386 | } |
| 387 | public function hasOption($name) |
| 388 | { |
| 389 | return isset($this->_options[$name]); |
| 390 | } |
| 391 | public function getOption($name) |
| 392 | { |
| 393 | return $this->_options[$name]; |
| 394 | } |
| 395 | public function getOptions() |
| 396 | { |
| 397 | return $this->_options; |
| 398 | } |
| 399 | public function visit(Visitor $visitor) |
| 400 | { |
| 401 | Deprecation::triggerIfCalledFromOutside('doctrine/dbal', 'https://github.com/doctrine/dbal/pull/5435', 'Table::visit() is deprecated.'); |
| 402 | $visitor->acceptTable($this); |
| 403 | foreach ($this->getColumns() as $column) { |
| 404 | $visitor->acceptColumn($this, $column); |
| 405 | } |
| 406 | foreach ($this->getIndexes() as $index) { |
| 407 | $visitor->acceptIndex($this, $index); |
| 408 | } |
| 409 | foreach ($this->getForeignKeys() as $constraint) { |
| 410 | $visitor->acceptForeignKey($this, $constraint); |
| 411 | } |
| 412 | } |
| 413 | public function __clone() |
| 414 | { |
| 415 | foreach ($this->_columns as $k => $column) { |
| 416 | $this->_columns[$k] = clone $column; |
| 417 | } |
| 418 | foreach ($this->_indexes as $k => $index) { |
| 419 | $this->_indexes[$k] = clone $index; |
| 420 | } |
| 421 | foreach ($this->_fkConstraints as $k => $fk) { |
| 422 | $this->_fkConstraints[$k] = clone $fk; |
| 423 | $this->_fkConstraints[$k]->setLocalTable($this); |
| 424 | } |
| 425 | } |
| 426 | private function _createUniqueConstraint(array $columnNames, string $indexName, array $flags = [], array $options = []) : UniqueConstraint |
| 427 | { |
| 428 | if (preg_match('(([^a-zA-Z0-9_]+))', $this->normalizeIdentifier($indexName)) === 1) { |
| 429 | throw SchemaException::indexNameInvalid($indexName); |
| 430 | } |
| 431 | foreach ($columnNames as $columnName) { |
| 432 | if (!$this->hasColumn($columnName)) { |
| 433 | throw SchemaException::columnDoesNotExist($columnName, $this->_name); |
| 434 | } |
| 435 | } |
| 436 | return new UniqueConstraint($indexName, $columnNames, $flags, $options); |
| 437 | } |
| 438 | private function normalizeIdentifier(?string $identifier) : string |
| 439 | { |
| 440 | if ($identifier === null) { |
| 441 | return ''; |
| 442 | } |
| 443 | return $this->trimQuotes(strtolower($identifier)); |
| 444 | } |
| 445 | public function setComment(?string $comment) : self |
| 446 | { |
| 447 | // For keeping backward compatibility with MySQL in previous releases, table comments are stored as options. |
| 448 | $this->addOption('comment', $comment); |
| 449 | return $this; |
| 450 | } |
| 451 | public function getComment() : ?string |
| 452 | { |
| 453 | return $this->_options['comment'] ?? null; |
| 454 | } |
| 455 | } |
| 456 |