1 | <?php |
||
9 | class SQLDefinitionParser implements DefinitionParserInterface |
||
10 | { |
||
11 | /** |
||
12 | * Array of supported DB servers |
||
13 | * @var array $supportedDatabases |
||
14 | */ |
||
15 | private $supportedDatabases; |
||
16 | |||
17 | 76 | public function __construct(array $supportedDatabases = array('mysql', 'postgres')) |
|
21 | |||
22 | /** |
||
23 | * Tells whether the given file can be handled by this handler, by checking e.g. the suffix |
||
24 | * |
||
25 | * @param string $migrationName typically a filename |
||
26 | * @return bool |
||
27 | */ |
||
28 | 74 | public function supports($migrationName) |
|
32 | |||
33 | /** |
||
34 | * Parses a migration definition file, and returns the list of actions to take |
||
35 | * |
||
36 | * @param MigrationDefinition $definition |
||
37 | * @return MigrationDefinition |
||
38 | */ |
||
39 | 5 | public function parseMigrationDefinition(MigrationDefinition $definition) |
|
65 | |||
66 | // allow both aaaa_mysql_etc.sql and aaaa_mysql.sql |
||
67 | 5 | protected function getDBFromFile($fileName) |
|
72 | } |
||
73 |