src/Rocketeer/Services/Config/ContextualConfiguration.php
public function getContextually($option, ConnectionKey $connectionKey = null)
    {
        $original = $this->configuration->get($option);
        $connectionKey = $connectionKey ?: $this->connections->getCurrentConnectionKey();

        $contexts = ['stages', 'connections', 'servers'];
        foreach ($contexts as $context) {
            if ($contextual = $this->getForContext($option, $context, $original, $connectionKey)) {
                return $contextual;
            }
        }

        return $original;
    }
public function getContextually($option, ConnectionKey $connectionKey = null)
    {
        $original = $this->configuration->get($option);
        $connectionKey = $connectionKey ?: $this->connections->getCurrentConnectionKey();

        $contexts = ['stages', 'connections', 'servers'];
        foreach ($contexts as $context) {
            if ($contextual = $this->getForContext($option, $context, $original, $connectionKey)) {
                return $contextual;
            }
        }

        return $original;
    }
public function getContextually ( $ option , ConnectionKey $ connectionKey = null ) { $ original = $ this -> configuration -> get ( $ option ) ; $ connectionKey = $ connectionKey ? : $ this -> connections -> getCurrentConnectionKey ( ) ; $ contexts = [ 'stages' , 'connections' , 'servers' ] ; foreach ( $ contexts as $ context ) { if ( $ contextual = $ this -> getForContext ( $ option , $ context , $ original , $ connectionKey ) ) { return $ contextual ; } } return $ original ; }
Get an option from Rocketeer's config file.

@param string             $option
@param ConnectionKey|null $connectionKey

@return array|Closure|string
Get an option from Rocketeer s config file .