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'])) {
|
if (isset($_REQUEST['action'])) {
|
||||||
$this->doAction($_REQUEST['action']);
|
$this->doAction($_REQUEST['action']);
|
||||||
} else {
|
} 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();
|
$this->printHelpHTML();
|
||||||
} elseif (isset($_REQUEST['format']) && $_REQUEST['format'] == 'typescript') {
|
} elseif ((isset($_REQUEST['format']) && $_REQUEST['format'] == 'typescript') || in_array('--typescript', $switches)) {
|
||||||
$this->printHelpTypescript();
|
$this->printHelpTypescript();
|
||||||
} else {
|
} else {
|
||||||
$this->printHelpJSON();
|
$this->printHelpJSON();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user