@@ 12-42 (lines=31) @@ | ||
9 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; |
|
10 | use Symfony\Component\DependencyInjection\ContainerAwareTrait; |
|
11 | ||
12 | class DownCommand extends \Mongrate\Command\DownCommand implements ContainerAwareInterface |
|
13 | { |
|
14 | use ExtendsStandaloneMongrateCommandTrait; |
|
15 | use ContainerAwareTrait; |
|
16 | ||
17 | /** |
|
18 | * @var ContainerAwareMigrationService |
|
19 | */ |
|
20 | protected $service; |
|
21 | ||
22 | public function __construct(array $config) |
|
23 | { |
|
24 | parent::__construct(null, $config); |
|
25 | } |
|
26 | ||
27 | /** |
|
28 | * {@inheritdoc} |
|
29 | */ |
|
30 | protected function getMigrationService(Configuration $configuration) |
|
31 | { |
|
32 | return new ContainerAwareMigrationService($configuration); |
|
33 | } |
|
34 | ||
35 | /** |
|
36 | * {@inheritdoc} |
|
37 | */ |
|
38 | public function initialize(InputInterface $input, OutputInterface $output) |
|
39 | { |
|
40 | $this->service->setContainer($this->container); |
|
41 | } |
|
42 | } |
|
43 |
@@ 12-42 (lines=31) @@ | ||
9 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; |
|
10 | use Symfony\Component\DependencyInjection\ContainerAwareTrait; |
|
11 | ||
12 | class TestCommand extends \Mongrate\Command\TestMigrationCommand implements ContainerAwareInterface |
|
13 | { |
|
14 | use ExtendsStandaloneMongrateCommandTrait; |
|
15 | use ContainerAwareTrait; |
|
16 | ||
17 | /** |
|
18 | * @var ContainerAwareMigrationService |
|
19 | */ |
|
20 | protected $service; |
|
21 | ||
22 | public function __construct(array $config) |
|
23 | { |
|
24 | parent::__construct(null, $config); |
|
25 | } |
|
26 | ||
27 | /** |
|
28 | * {@inheritdoc} |
|
29 | */ |
|
30 | protected function getMigrationService(Configuration $configuration) |
|
31 | { |
|
32 | return new ContainerAwareMigrationService($configuration); |
|
33 | } |
|
34 | ||
35 | /** |
|
36 | * {@inheritdoc} |
|
37 | */ |
|
38 | public function initialize(InputInterface $input, OutputInterface $output) |
|
39 | { |
|
40 | $this->service->setContainer($this->container); |
|
41 | } |
|
42 | } |
|
43 |
@@ 12-42 (lines=31) @@ | ||
9 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; |
|
10 | use Symfony\Component\DependencyInjection\ContainerAwareTrait; |
|
11 | ||
12 | class ToggleMigrationCommand extends \Mongrate\Command\ToggleMigrationCommand implements ContainerAwareInterface |
|
13 | { |
|
14 | use ExtendsStandaloneMongrateCommandTrait; |
|
15 | use ContainerAwareTrait; |
|
16 | ||
17 | /** |
|
18 | * @var ContainerAwareMigrationService |
|
19 | */ |
|
20 | protected $service; |
|
21 | ||
22 | public function __construct(array $config) |
|
23 | { |
|
24 | parent::__construct(null, $config); |
|
25 | } |
|
26 | ||
27 | /** |
|
28 | * {@inheritdoc} |
|
29 | */ |
|
30 | protected function getMigrationService(Configuration $configuration) |
|
31 | { |
|
32 | return new ContainerAwareMigrationService($configuration); |
|
33 | } |
|
34 | ||
35 | /** |
|
36 | * {@inheritdoc} |
|
37 | */ |
|
38 | public function initialize(InputInterface $input, OutputInterface $output) |
|
39 | { |
|
40 | $this->service->setContainer($this->container); |
|
41 | } |
|
42 | } |
|
43 |
@@ 12-42 (lines=31) @@ | ||
9 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; |
|
10 | use Symfony\Component\DependencyInjection\ContainerAwareTrait; |
|
11 | ||
12 | class UpAllCommand extends \Mongrate\Command\UpAllCommand implements ContainerAwareInterface |
|
13 | { |
|
14 | use ExtendsStandaloneMongrateCommandTrait; |
|
15 | use ContainerAwareTrait; |
|
16 | ||
17 | /** |
|
18 | * @var ContainerAwareMigrationService |
|
19 | */ |
|
20 | protected $service; |
|
21 | ||
22 | public function __construct(array $config) |
|
23 | { |
|
24 | parent::__construct(null, $config); |
|
25 | } |
|
26 | ||
27 | /** |
|
28 | * {@inheritdoc} |
|
29 | */ |
|
30 | protected function getMigrationService(Configuration $configuration) |
|
31 | { |
|
32 | return new ContainerAwareMigrationService($configuration); |
|
33 | } |
|
34 | ||
35 | /** |
|
36 | * {@inheritdoc} |
|
37 | */ |
|
38 | public function initialize(InputInterface $input, OutputInterface $output) |
|
39 | { |
|
40 | $this->service->setContainer($this->container); |
|
41 | } |
|
42 | } |
|
43 |
@@ 12-42 (lines=31) @@ | ||
9 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; |
|
10 | use Symfony\Component\DependencyInjection\ContainerAwareTrait; |
|
11 | ||
12 | class UpCommand extends \Mongrate\Command\UpCommand implements ContainerAwareInterface |
|
13 | { |
|
14 | use ExtendsStandaloneMongrateCommandTrait; |
|
15 | use ContainerAwareTrait; |
|
16 | ||
17 | /** |
|
18 | * @var ContainerAwareMigrationService |
|
19 | */ |
|
20 | protected $service; |
|
21 | ||
22 | public function __construct(array $config) |
|
23 | { |
|
24 | parent::__construct(null, $config); |
|
25 | } |
|
26 | ||
27 | /** |
|
28 | * {@inheritdoc} |
|
29 | */ |
|
30 | protected function getMigrationService(Configuration $configuration) |
|
31 | { |
|
32 | return new ContainerAwareMigrationService($configuration); |
|
33 | } |
|
34 | ||
35 | /** |
|
36 | * {@inheritdoc} |
|
37 | */ |
|
38 | public function initialize(InputInterface $input, OutputInterface $output) |
|
39 | { |
|
40 | $this->service->setContainer($this->container); |
|
41 | } |
|
42 | } |
|
43 |