| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace ModulesGarden\Servers\ProxmoxVps\Core\CommandLine;
- use Symfony\Component\Console\Input\InputInterface;
- use Symfony\Component\Console\Output\OutputInterface;
- use Symfony\Component\Console\Style\SymfonyStyle;
- /**
- * Class Command
- * @package ModulesGarden\Servers\ProxmoxVps\Core\CommandLine
- */
- class Command extends AbstractCommand
- {
- /**
- *
- */
- final protected function configure()
- {
- parent::configure();
- }
- /**
- * Execute command
- * @param InputInterface $input
- * @param OutputInterface $output
- */
- final protected function execute(InputInterface $input, OutputInterface $output)
- {
- return parent::execute($input, $output, new SymfonyStyle($input, $output));
- }
- /**
- * @param InputInterface $input
- * @param OutputInterface $output
- * @throws \Exception
- */
- protected function beforeProcess(InputInterface $input, OutputInterface $output)
- {
- (new Hypervisor($this->getName(), $input->getOptions()))
- ->lock();
- }
- /**
- * @param InputInterface $input
- * @param OutputInterface $output
- */
- protected function afterProcess(InputInterface $input, OutputInterface $output)
- {
- (new Hypervisor($this->getName(), $input->getOptions()))
- ->unlock();
- }
- }
|