-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevkinsta-cli.php
More file actions
42 lines (30 loc) · 1.04 KB
/
devkinsta-cli.php
File metadata and controls
42 lines (30 loc) · 1.04 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
namespace DevKinsta\CLI;
use Phar;
use Symfony\Component\Console\Application;
use DevKinsta\CLI\Helpers\CommandsHelper;
define('DEV_KINSTA_CLI_START', microtime(true));
define('DEV_KINSTA_CLI_ROOT_DIR', __DIR__.DIRECTORY_SEPARATOR);
require __DIR__.'/vendor/autoload.php';
$devKinstaCLI = new Application();
$commands = array(
'DevKinsta\\CLI\\Commands\\Container\\RestartCommand',
'DevKinsta\\CLI\\Commands\\Export\\SiteCommand',
'DevKinsta\\CLI\\Commands\\PHP\\MaxFileUploadSizeCommand',
'DevKinsta\\CLI\\Commands\\PHP\\MemoryLimitCommand',
'DevKinsta\\CLI\\Commands\\PHP\\SetCommand',
'DevKinsta\\CLI\\Commands\\Sites\\ListCommand',
'DevKinsta\\CLI\\Commands\\Sites\\RebuildCommand',
);
// Finder and Iterator have problems when working in phar.
if (false === CommandsHelper::isPhar()) {
$commands = CommandsHelper::getAvailableCommands();
}
foreach ($commands as $command) {
$devKinstaCLI->add(new $command());
}
try {
$devKinstaCLI->run();
} catch (\Exception $e) {
die($e->getMessage() . PHP_EOL);
}