public function get($key, $default = null)
    {
        if ($value = $this->getEnv($key)) {
            return $value;
        }

        $key = strtolower(str_replace('_', '-', $key));

        if (strpos($key, 'bolt-') !== 0) {
            $key = 'bolt-' . $key;
        }

        return isset($this->composerExtra[$key]) ? $this->composerExtra[$key] : $default;
    }
public function get($key, $default = null)
    {
        if ($value = $this->getEnv($key)) {
            return $value;
        }

        $key = strtolower(str_replace('_', '-', $key));

        if (strpos($key, 'bolt-') !== 0) {
            $key = 'bolt-' . $key;
        }

        return isset($this->composerExtra[$key]) ? $this->composerExtra[$key] : $default;
    }
public function get ( $ key , $ default = null ) { if ( $ value = $ this -> getEnv ( $ key ) ) { return $ value ; } $ key = strtolower ( str_replace ( '_' , '-' , $ key ) ) ; if ( strpos ( $ key , 'bolt-' ) !== 0 ) { $ key = 'bolt-' . $ key ; } return isset ( $ this -> composerExtra [ $ key ] ) ? $ this -> composerExtra [ $ key ] : $ default ; }
Get an option from environment variable or composer's extra section.

Example: With key "dir-mode" it checks for "BOLT_DIR_MODE" environment variable,
then "bolt-dir-mode" in composer's extra section, then returns given default value.

@param string $key
@param mixed  $default

@return mixed
Get an option from environment variable or composer s extra section .