public function dispatch($extra = [])
    {
        try {
            $result = $this->_dispatch($extra);
        } catch (StopException $e) {
            return $e->getCode();
        }
        if ($result === null || $result === true) {
            return Shell::CODE_SUCCESS;
        }
        if (is_int($result)) {
            return $result;
        }

        return Shell::CODE_ERROR;
    }
public function dispatch($extra = [])
    {
        try {
            $result = $this->_dispatch($extra);
        } catch (StopException $e) {
            return $e->getCode();
        }
        if ($result === null || $result === true) {
            return Shell::CODE_SUCCESS;
        }
        if (is_int($result)) {
            return $result;
        }

        return Shell::CODE_ERROR;
    }
public function dispatch ( $ extra = [ ] ) { try { $ result = $ this -> _dispatch ( $ extra ) ; } catch ( StopException $ e ) { return $ e -> getCode ( ) ; } if ( $ result === null || $ result === true ) { return Shell :: CODE_SUCCESS ; } if ( is_int ( $ result ) ) { return $ result ; } return Shell :: CODE_ERROR ; }
Dispatches a CLI request

Converts a shell command result into an exit code. Null/True
are treated as success. All other return values are an error.

@param array $extra Extra parameters that you can manually pass to the Shell
to be dispatched.
Built-in extra parameter is :
- `requested` : if used, will prevent the Shell welcome message to be displayed
@return int The cli command exit code. 0 is success.
Dispatches a CLI request