[FEATURE] Doctrine: Implement SchemaMigrationService
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Database / Schema / Parser / AST / CreateForeignKeyDefinitionItem.php
1 <?php
2 declare(strict_types=1);
3
4 namespace TYPO3\CMS\Core\Database\Schema\Parser\AST;
5
6 /*
7 * This file is part of the TYPO3 CMS project.
8 *
9 * It is free software; you can redistribute it and/or modify it under
10 * the terms of the GNU General Public License, either version 2
11 * of the License, or any later version.
12 *
13 * For the full copyright and license information, please read the
14 * LICENSE.txt file that was distributed with this source code.
15 *
16 * The TYPO3 project - inspiring people to share!
17 */
18
19 /**
20 * Syntax node to structure a foreign key definition.
21 */
22 class CreateForeignKeyDefinitionItem extends AbstractCreateDefinitionItem
23 {
24 /**
25 * @var
26 */
27 public $indexName = '';
28
29 /**
30 * The index name
31 *
32 * @var string
33 */
34 public $name = '';
35
36 /**
37 * @var IndexColumnName[]
38 */
39 public $columnNames = [];
40
41 /**
42 * Reference definition
43 *
44 * @var ReferenceDefinition
45 */
46 public $reference;
47
48 /**
49 * CreateForeignKeyDefinitionItem constructor.
50 *
51 * @param \TYPO3\CMS\Core\Database\Schema\Parser\AST\Identifier $indexName
52 * @param array $columnNames
53 * @param \TYPO3\CMS\Core\Database\Schema\Parser\AST\ReferenceDefinition $reference
54 */
55 public function __construct(Identifier $indexName, array $columnNames, ReferenceDefinition $reference)
56 {
57 $this->indexName = $indexName;
58 $this->columnNames = $columnNames;
59 $this->reference = $reference;
60 }
61 }