serverctl/src/Commands/Command.php

26 lines
695 B
PHP

<?php
namespace NoccyLabs\Serverctl\Commands;
use NoccyLabs\Serverctl\ConsoleApplication;
use NoccyLabs\Serverctl\Container\ContainerManager;
use NoccyLabs\Serverctl\Registry\ServiceRegistry;
use Symfony\Component\Console\Command\Command as CommandCommand;
abstract class Command extends CommandCommand
{
public function getApplication(): ?ConsoleApplication
{
return parent::getApplication();
}
protected function getServiceRegistry(): ServiceRegistry
{
return $this->getApplication()->getServiceRegistry();
}
protected function getContainerManager(): ContainerManager
{
return $this->getApplication()->getContainerManager();
}
}