Files
oficial/cli/common/Alias/Application.php
2023-11-25 00:56:18 -03:00

21 lines
565 B
PHP

<?php
namespace Incoviba\Common\Alias;
use Psr\Container\ContainerInterface;
use Symfony\Component\Console\Application as Base;
class Application extends Base
{
public function __construct(protected ContainerInterface $container, string $name = 'UNKNOWN', string $version = 'UNKNOWN')
{
if ($this->container->has('APP_NAME')) {
$name = $this->container->get('APP_NAME');
}
parent::__construct($name, $version);
}
public function getContainer(): ContainerInterface
{
return $this->container;
}
}