Example #1
0
 /**
  * Initialize the editor strategy.
  *
  * @param string[] $editors The names to the potential editors.  The first
  *     command in the list that can be located will be used.
  * @param \Nubs\Which\Locator $commandLocator The command locator.  This
  *     helps locate commands using PATH.
  * @param \Habitat\Environment\Environment $environment The environment
  *     variable wrapper.  Defaults to null, which just uses the built-in
  *     getenv.
  */
 public function __construct(array $editors, CommandLocator $commandLocator, Environment $environment = null)
 {
     parent::__construct([new EnvironmentVariableStrategy('EDITOR', $environment), new CommandLocatorStrategy($editors, $commandLocator)]);
 }