1 | <?php |
||
38 | class RemovePrefixes implements Visitor |
||
39 | { |
||
40 | |||
41 | protected $newSchema; |
||
42 | |||
43 | /** |
||
44 | * Constructor |
||
45 | */ |
||
46 | 8 | public function __construct() |
|
50 | |||
51 | /** |
||
52 | * return the generated Schema |
||
53 | * |
||
54 | * @return Schema the generated schema object |
||
55 | */ |
||
56 | 2 | public function getNewSchema() |
|
60 | |||
61 | /** |
||
62 | * set list of tables to limit schema |
||
63 | * |
||
64 | * If no list is specified, all tables will be included |
||
65 | * |
||
66 | * @param array $tableList list of tables to allow |
||
67 | * |
||
68 | * @return void |
||
69 | */ |
||
70 | public function setTableFilter(array $tableList) |
||
71 | { |
||
72 | $this->newSchema->setTableFilter($tableList); |
||
73 | } |
||
74 | |||
75 | /** |
||
76 | * Accept schema - not used in this context |
||
77 | * |
||
78 | * @param Schema $schema a schema object |
||
79 | * |
||
80 | * @return void |
||
81 | */ |
||
82 | 1 | public function acceptSchema(Schema $schema) |
|
86 | |||
87 | /** |
||
88 | * Accept a table with all its dependencies. |
||
89 | * |
||
90 | * @param Table $table a table object |
||
91 | * |
||
92 | * @return void |
||
93 | */ |
||
94 | 1 | public function acceptTable(Table $table) |
|
98 | |||
99 | /** |
||
100 | * accept a column in the schema - not used in this context |
||
101 | * |
||
102 | * @param Table $table a table object to accept a column into |
||
103 | * @param Column $column a column object to be accepted |
||
104 | * |
||
105 | * @return void |
||
106 | */ |
||
107 | 1 | public function acceptColumn(Table $table, Column $column) |
|
111 | |||
112 | /** |
||
113 | * Accept a foreign key in the schema - not used in this context |
||
114 | * |
||
115 | * @param Table $localTable local table to have foreign key |
||
116 | * @param ForeignKeyConstraint $fkConstraint foreign key constraint |
||
117 | * |
||
118 | * @return void |
||
119 | */ |
||
120 | 1 | public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkConstraint) |
|
124 | |||
125 | /** |
||
126 | * Accept an Index - not used in this context |
||
127 | * |
||
128 | * @param Table $table indexed table |
||
129 | * @param Index $index index to accept |
||
130 | * |
||
131 | * @return void |
||
132 | */ |
||
133 | 1 | public function acceptIndex(Table $table, Index $index) |
|
137 | |||
138 | /** |
||
139 | * Accept a sequence |
||
140 | * |
||
141 | * @param Sequence $sequence sequence to accept |
||
142 | * |
||
143 | * @return void |
||
144 | */ |
||
145 | 1 | public function acceptSequence(Sequence $sequence) |
|
149 | } |
||
150 |