-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathcli
More file actions
executable file
·26 lines (19 loc) · 672 Bytes
/
cli
File metadata and controls
executable file
·26 lines (19 loc) · 672 Bytes
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
#!/bin/env php
<?php
/**
* @author Marien Fressinaud <dev@marienfressinaud.fr>
* @license http://www.gnu.org/licenses/agpl-3.0.en.html AGPL
*/
if (php_sapi_name() !== 'cli') {
die('This script must be called from command line.');
}
// Setup the Minz framework
$app_path = __DIR__;
include $app_path . '/vendor/autoload.php';
\App\Configuration::load('dotenv', $app_path);
\App\Configuration::$no_syslog_output = true;
$request = \Minz\Request::initFromCli($argv);
// Initialize the Application and execute the request to get a Response
$application = new \App\cli\Application();
$response = $application->run($request);
\Minz\Response::sendToCli($response);