21 lines
565 B
PHP
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;
|
|
}
|
|
}
|