summaryrefslogtreecommitdiff
path: root/src/IAC.php
blob: c4e476d119c3af589236f04f3bb7f95338482f05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php

namespace PHPIAC;

use PetrKnap\Php\Singleton\SingletonTrait;
use PHPIAC\Command\RunCommand;
use Symfony\Component\Console\Application;

class IAC
{
    use SingletonTrait;

    public function __construct()
    {
        $application = new Application();

        $defaultCommand = new RunCommand();
        $application->add($defaultCommand);
        $application->setDefaultCommand($defaultCommand->getName());

        # ... other commands here

        $application->run();
    }
}