RprtCli/app/src/Commands/AbstractCliCommand.php

35 lines
750 B
PHP
Raw Normal View History

2023-01-02 15:18:52 +01:00
<?php
declare(strict_types=1);
// src/Commands/InvoiceCommand.php;
namespace RprtCli\Commands;
use RprtCli\Utils\Configuration\ConfigurationInterface;
use Symfony\Component\Console\Command\Command;
// use Symfony\Contracts\Translation\TranslatorInterface;
/**
* Abstract class that adds some common services and input options.
*/
class AbstractCliCommand extends Command
{
protected $configuration;
// @TODO Add service factory service.
// protected $trackingServiceFactory;
2023-01-10 10:42:36 +01:00
/**
* Dependency inversion.
*/
2023-01-02 15:18:52 +01:00
public function __construct(
ConfigurationInterface $configuration,
?string $name = null
) {
$this->configuration = $configuration;
parent::__construct($name);
}
}