| 1 | <?php |
||
| 8 | class MigrationQueryExecutor |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var Connection |
||
| 12 | */ |
||
| 13 | protected $connection; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var LoggerInterface |
||
| 17 | */ |
||
| 18 | protected $logger; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param Connection $connection |
||
| 22 | */ |
||
| 23 | public function __construct(Connection $connection) |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Sets a logger |
||
| 30 | * |
||
| 31 | * @param LoggerInterface $logger |
||
| 32 | */ |
||
| 33 | public function setLogger(LoggerInterface $logger) |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Gets a connection object this migration query executor works with |
||
| 40 | * |
||
| 41 | * @return Connection |
||
| 42 | */ |
||
| 43 | public function getConnection() |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Executes the given query |
||
| 50 | * |
||
| 51 | * @param string|MigrationQuery $query |
||
| 52 | * @param bool $dryRun |
||
| 53 | */ |
||
| 54 | public function execute($query, $dryRun) |
||
| 77 | } |
||
| 78 |