Files
oficial/cli/common/Alias/Application.php
Juan Pablo Vial 84861b5e57 Cli user
2024-07-26 23:15:48 -04:00

23 lines
628 B
PHP

<?php
namespace Incoviba\Common\Alias;
use Incoviba\Common\Implement\Message;
use Psr\Container\ContainerInterface;
use Symfony\Component\Console;
use Incoviba\Common\Concept;
class Application extends Console\Application
{
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;
}
}