src/Rocketeer/Services/Connections/Shell/Bash.php
public function getStrategy($strategy, $concrete = null, $options = [])
    {
        // Try to build the strategy
        $strategy = $this->builder->buildStrategy($strategy, $concrete);
        if (!$strategy || !$strategy->isExecutable()) {
            return;
        }

        // Configure strategy
        if ($options || $this->options) {
            $options = array_replace((array) $options, $strategy->getOptions(), $this->options);
            $strategy = $strategy->setOptions($options);
        }

        return $this->explainer->displayBelow(function () use ($strategy) {
            return $strategy->displayStatus();
        });
    }
public function getStrategy($strategy, $concrete = null, $options = [])
    {
        // Try to build the strategy
        $strategy = $this->builder->buildStrategy($strategy, $concrete);
        if (!$strategy || !$strategy->isExecutable()) {
            return;
        }

        // Configure strategy
        if ($options || $this->options) {
            $options = array_replace((array) $options, $strategy->getOptions(), $this->options);
            $strategy = $strategy->setOptions($options);
        }

        return $this->explainer->displayBelow(function () use ($strategy) {
            return $strategy->displayStatus();
        });
    }
public function getStrategy ( $ strategy , $ concrete = null , $ options = [ ] ) { // Try to build the strategy $ strategy = $ this -> builder -> buildStrategy ( $ strategy , $ concrete ) ; if ( ! $ strategy || ! $ strategy -> isExecutable ( ) ) { return ; } // Configure strategy if ( $ options || $ this -> options ) { $ options = array_replace ( ( array ) $ options , $ strategy -> getOptions ( ) , $ this -> options ) ; $ strategy = $ strategy -> setOptions ( $ options ) ; } return $ this -> explainer -> displayBelow ( function ( ) use ( $ strategy ) { return $ strategy -> displayStatus ( ) ; } ) ; }
Get the implementation behind a strategy.

@param string      $strategy
@param string|null $concrete
@param array       $options

@return \Rocketeer\Strategies\AbstractStrategy
Get the implementation behind a strategy .