generated from othneildrew/Best-README-Template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathHkmPHP
executable file
·56 lines (34 loc) · 1.09 KB
/
HkmPHP
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/php
<?php
use Symfony\Component\Process\Process;
define('HKM_START', microtime(true));
define('BOOT', 'cli');
define('SYSTEM', true);
define('HKM_DEBUG', true);
global $engine;
global $hkm_version;
$hkm_version = 0.1;
$engine = '.';
$version = '0.1';
$pathsConfig = 'src/PathsConfig.php';
// // We want errors to be shown when using it from the CLI.
error_reporting(-1);
ini_set('display_errors', '1');
require realpath($pathsConfig) ?: $pathsConfig;
$paths = new Paths();
$bootstrap = rtrim($paths::$systemDirectory, '\\/ ') . DIRECTORY_SEPARATOR . 'bootstrap.php';
$app = require realpath($bootstrap) ?: $bootstrap;
$console = new Hkm_code\CLI\Terminal($app);
// d('Place holder value is not an Array');
// Show basic information before we do anything else.
if (is_int($suppress = array_search('--no-header', $_SERVER['argv'], true)))
{
unset($_SERVER['argv'][$suppress]); // @codeCoverageIgnore
$suppress = true;
}
$console::SHOW_HEADER($suppress);
$response = $console::RUN_BIN();
if ($response::GET_STATUS_CODE() >= 300)
{
exit($response::GET_STATUS_CODE());
}