| @@ 13-34 (lines=22) @@ | ||
| 10 | use Zend\ServiceManager\FactoryInterface; |
|
| 11 | use Zend\ServiceManager\ServiceLocatorInterface; |
|
| 12 | ||
| 13 | class CheckMigrationsUpToDateFactory implements FactoryInterface |
|
| 14 | { |
|
| 15 | /** |
|
| 16 | * Create service |
|
| 17 | * |
|
| 18 | * @param ServiceLocatorInterface $serviceLocator |
|
| 19 | * @return mixed |
|
| 20 | * @throws \Zend\Console\Exception\RuntimeException |
|
| 21 | * @throws \Zend\ServiceManager\Exception\ServiceNotFoundException |
|
| 22 | */ |
|
| 23 | public function createService(ServiceLocatorInterface $serviceLocator) |
|
| 24 | { |
|
| 25 | /** @var UpToDateCommand $command */ |
|
| 26 | $command = $serviceLocator->get('doctrine.migrations_cmd.uptodate'); |
|
| 27 | ||
| 28 | $input = new RequestInput(new Request(array())); |
|
| 29 | ||
| 30 | $output = new PropertyOutput(); |
|
| 31 | ||
| 32 | return new CheckCommand($command, $input, $output); |
|
| 33 | } |
|
| 34 | } |
|
| 35 | ||
| @@ 13-34 (lines=22) @@ | ||
| 10 | use Zend\ServiceManager\FactoryInterface; |
|
| 11 | use Zend\ServiceManager\ServiceLocatorInterface; |
|
| 12 | ||
| 13 | class CheckOrmInfoFactory implements FactoryInterface |
|
| 14 | { |
|
| 15 | /** |
|
| 16 | * Create service |
|
| 17 | * |
|
| 18 | * @param ServiceLocatorInterface $serviceLocator |
|
| 19 | * @return CheckCommand |
|
| 20 | * @throws \Zend\Console\Exception\RuntimeException |
|
| 21 | * @throws \Zend\ServiceManager\Exception\ServiceNotFoundException |
|
| 22 | */ |
|
| 23 | public function createService(ServiceLocatorInterface $serviceLocator) |
|
| 24 | { |
|
| 25 | /** @var InfoCommand $command */ |
|
| 26 | $command = $serviceLocator->get('doctrine.orm_cmd.info'); |
|
| 27 | ||
| 28 | $input = new RequestInput(new Request(array())); |
|
| 29 | ||
| 30 | $output = new PropertyOutput(); |
|
| 31 | ||
| 32 | return new CheckCommand($command, $input, $output); |
|
| 33 | } |
|
| 34 | } |
|
| 35 | ||
| @@ 12-33 (lines=22) @@ | ||
| 9 | use Zend\ServiceManager\FactoryInterface; |
|
| 10 | use Zend\ServiceManager\ServiceLocatorInterface; |
|
| 11 | ||
| 12 | class CheckSchemaFactory implements FactoryInterface |
|
| 13 | { |
|
| 14 | /** |
|
| 15 | * Create service |
|
| 16 | * |
|
| 17 | * @param ServiceLocatorInterface $serviceLocator |
|
| 18 | * @return CheckCommand |
|
| 19 | * @throws \Zend\Console\Exception\RuntimeException |
|
| 20 | * @throws \Zend\ServiceManager\Exception\ServiceNotFoundException |
|
| 21 | */ |
|
| 22 | public function createService(ServiceLocatorInterface $serviceLocator) |
|
| 23 | { |
|
| 24 | /** @var ValidateSchemaCommand $command */ |
|
| 25 | $command = $serviceLocator->get('doctrine.orm_cmd.validate_schema'); |
|
| 26 | ||
| 27 | $input = new RequestInput(new Request(array())); |
|
| 28 | ||
| 29 | $output = new PropertyOutput(); |
|
| 30 | ||
| 31 | return new CheckCommand($command, $input, $output); |
|
| 32 | } |
|
| 33 | } |
|
| 34 | ||