예제 #1
0
}
/**
 * Specify the working directory, if it hasn't been set yet.
 */
if (!defined('GITIFY_WORKING_DIR')) {
    define('GITIFY_WORKING_DIR', $cwd = getcwd() . DIRECTORY_SEPARATOR);
}
/**
 * Load all the commands and create the Gitify instance
 */
use modmore\Gitify\Gitify;
use modmore\Gitify\Command\BackupCommand;
use modmore\Gitify\Command\BuildCommand;
use modmore\Gitify\Command\ExtractCommand;
use modmore\Gitify\Command\InitCommand;
use modmore\Gitify\Command\InstallModxCommand;
use modmore\Gitify\Command\InstallPackageCommand;
use modmore\Gitify\Command\RestoreCommand;
$application = new Gitify('Gitify', '0.9.0');
$application->add(new InitCommand());
$application->add(new BuildCommand());
$application->add(new ExtractCommand());
$application->add(new InstallModxCommand());
$application->add(new InstallPackageCommand());
$application->add(new BackupCommand());
$application->add(new RestoreCommand());
/**
 * We return it so the CLI controller in /Gitify can run it, or for other integrations to
 * work with the Gitify api directly.
 */
return $application;