added processing swtiches in command line mode
This commit is contained in:
parent
ab7bd57362
commit
650cc46157
@ -27,9 +27,11 @@ class APIlite
|
||||
if (isset($_REQUEST['action'])) {
|
||||
$this->doAction($_REQUEST['action']);
|
||||
} else {
|
||||
if (isset($_REQUEST['format']) && $_REQUEST['format'] == 'html') {
|
||||
global $argv;
|
||||
$switches = array_map('strtolower', $argv);
|
||||
if ((isset($_REQUEST['format']) && $_REQUEST['format'] == 'html') || in_array('--html', $switches)) {
|
||||
$this->printHelpHTML();
|
||||
} elseif (isset($_REQUEST['format']) && $_REQUEST['format'] == 'typescript') {
|
||||
} elseif ((isset($_REQUEST['format']) && $_REQUEST['format'] == 'typescript') || in_array('--typescript', $switches)) {
|
||||
$this->printHelpTypescript();
|
||||
} else {
|
||||
$this->printHelpJSON();
|
||||
|
Loading…
x
Reference in New Issue
Block a user