-
Notifications
You must be signed in to change notification settings - Fork 0
/
stg
executable file
·41 lines (32 loc) · 1.16 KB
/
stg
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
#!/usr/bin/env php
<?php
/*
* This file is part of the OrbitaleCmsBundle package.
*
* (c) Alexandre Rock Ancelet <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
if (PHP_VERSION_ID < 50400) {
file_put_contents('php://stderr', sprintf(
"Orbitale random string generator requires PHP 5.4 version or higher and your system has\n".
"PHP %s version installed.\n\n".
"To solve this issue, upgrade your PHP installation.\n\n",
PHP_VERSION
));
exit(1);
}
require file_exists(__DIR__.'/vendor/autoload.php')
? __DIR__.'/vendor/autoload.php'
: __DIR__.'/../../autoload.php';
$appVersion = '0.1-dev';
// Windows uses Path instead of PATH
if (!isset($_SERVER['PATH']) && isset($_SERVER['Path'])) {
$_SERVER['PATH'] = $_SERVER['Path'];
}
$app = new Orbitale\RandomStringGenerator\Application('Orbitale Random String Generator', $appVersion);
$app->add(new Orbitale\RandomStringGenerator\AboutCommand($appVersion));
$app->add(new Orbitale\RandomStringGenerator\GenerateCommand());
$app->setDefaultCommand('about');
$app->run();