Liip\RMT\Application::__construct PHP Method

__construct() public method

public __construct ( )
    public function __construct()
    {
        // Creation
        parent::__construct('Release Management Tool', RMT_VERSION);
        self::$instance = $this;
        // Change the current directory in favor of the project root folder,
        // this allow to run the task from outside the project like:
        //     $/home/www> myproject/RMT release
        chdir($this->getProjectRootDir());
        // Add all command, in a controlled way and render exception if any
        try {
            // Add the default command
            $this->add(new InitCommand());
            // Add command that require the config file
            if (file_exists($this->getConfigFilePath())) {
                $this->add(new ReleaseCommand());
                $this->add(new CurrentCommand());
                $this->add(new ChangesCommand());
                $this->add(new ConfigCommand());
            }
        } catch (\Exception $e) {
            $output = new \Liip\RMT\Output\Output();
            $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE);
            $this->renderException($e, $output);
            exit(1);
        }
    }