PHPDaemon\Applications\GibsonREST\Request::importCmdArgs PHP Method

importCmdArgs() protected method

* Import command name and arguments from input
protected importCmdArgs ( )
    protected function importCmdArgs()
    {
        $this->cmd = static::getString($_GET['cmd']);
        if ($this->cmd === '') {
            $e = explode('/', isset($this->attrs->server['SUBPATH']) ? $this->attrs->server['SUBPATH'] : $this->attrs->server['DOCUMENT_URI']);
            $this->cmd = array_shift($e);
            $this->args = sizeof($e) ? array_map('urldecode', $e) : [];
        }
        if (!$this->appInstance->gibson->isCommand($this->cmd) && $this->cmd !== 'LOGIN' && $this->cmd !== 'LOGOUT') {
            $this->result = ['$err' => 'Unrecognized command'];
            return false;
        }
        return true;
    }