36 lines
1019 B
PHP
36 lines
1019 B
PHP
<?php
|
|
|
|
namespace NoccyLabs\Hotfix\Command;
|
|
|
|
use Symfony\Component\Console\Command\Command;
|
|
|
|
use Symfony\Component\Console\Input\InputInterface;
|
|
use Symfony\Component\Console\Input\InputArgument;
|
|
use Symfony\Component\Console\Input\InputOption;
|
|
use Symfony\Component\Console\Output\OutputInterface;
|
|
use Symfony\Component\Console\Question\ConfirmationQuestion;
|
|
use Symfony\Component\Console\Question\ChoiceQuestion;
|
|
use Symfony\Component\ExpressionLanguage\ExpressionLanguage;
|
|
use NoccyLabs\Hotfix\Hotfix\Loader;
|
|
use NoccyLabs\Hotfix\System\Facts;
|
|
|
|
class FactsCommand extends Command
|
|
{
|
|
|
|
protected function configure()
|
|
{
|
|
$this->setName("facts");
|
|
$this->setDescription("List the facts as collected on this system");
|
|
}
|
|
|
|
protected function execute(InputInterface $input, OutputInterface $output)
|
|
{
|
|
$facts = Facts::getSystemFacts()->getFlat();
|
|
|
|
foreach ($facts as $fact=>$value) {
|
|
$output->writeln(" <comment>{$fact}</>: <info>{$value}</>");
|
|
}
|
|
|
|
}
|
|
}
|