protected function getHome()
    {
        if (isset($this->home)) {
            return $this->home;
        }
        // determine home dir
        $home = getenv('CBT_HOME');
        if (!$home) {
            if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
                if (!getenv('APPDATA')) {
                    throw new \RuntimeException(
                        'The APPDATA or CBT_HOME environment variable must be set for cbt to run correctly'
                    );
                }
                $home = strtr(getenv('APPDATA'), '\\', '/') . '/CBT';
            } else {
                if (!getenv('HOME')) {
                    throw new \RuntimeException(
                        'The HOME or CBT_HOME environment variable must be set for cbt to run correctly'
                    );
                }
                $home = rtrim(getenv('HOME'), '/') . '/.config/ctb';
            }
        }

        $this->home = $home;

        return $home;
    }
protected function getHome()
    {
        if (isset($this->home)) {
            return $this->home;
        }
        // determine home dir
        $home = getenv('CBT_HOME');
        if (!$home) {
            if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
                if (!getenv('APPDATA')) {
                    throw new \RuntimeException(
                        'The APPDATA or CBT_HOME environment variable must be set for cbt to run correctly'
                    );
                }
                $home = strtr(getenv('APPDATA'), '\\', '/') . '/CBT';
            } else {
                if (!getenv('HOME')) {
                    throw new \RuntimeException(
                        'The HOME or CBT_HOME environment variable must be set for cbt to run correctly'
                    );
                }
                $home = rtrim(getenv('HOME'), '/') . '/.config/ctb';
            }
        }

        $this->home = $home;

        return $home;
    }
protected function getHome ( ) { if ( isset ( $ this -> home ) ) { return $ this -> home ; } // determine home dir $ home = getenv ( 'CBT_HOME' ) ; if ( ! $ home ) { if ( defined ( 'PHP_WINDOWS_VERSION_MAJOR' ) ) { if ( ! getenv ( 'APPDATA' ) ) { throw new \ RuntimeException ( 'The APPDATA or CBT_HOME environment variable must be set for cbt to run correctly' ) ; } $ home = strtr ( getenv ( 'APPDATA' ) , '\\' , '/' ) . '/CBT' ; } else { if ( ! getenv ( 'HOME' ) ) { throw new \ RuntimeException ( 'The HOME or CBT_HOME environment variable must be set for cbt to run correctly' ) ; } $ home = rtrim ( getenv ( 'HOME' ) , '/' ) . '/.config/ctb' ; } } $ this -> home = $ home ; return $ home ; }
Determine the home directory where cbt config files shall be stored.

@return string

@throws \RuntimeException When neither a valid home dir nor the CBT_HOME environment variables are defined.
Determine the home directory where cbt config files shall be stored .