annotate vendor/consolidation/site-process/src/Transport/TransportInterface.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents
children
rev   line source
Chris@5 1 <?php
Chris@5 2
Chris@5 3 namespace Consolidation\SiteProcess\Transport;
Chris@5 4
Chris@5 5 use Consolidation\SiteProcess\SiteProcess;
Chris@5 6
Chris@5 7 /**
Chris@5 8 * SshTransport knows how to wrap a command such that it runs on a remote
Chris@5 9 * system via the ssh cli.
Chris@5 10 *
Chris@5 11 * There is always a transport for every factory, and visa-versa.
Chris@5 12 *
Chris@5 13 * @see Consolidation\SiteProcess\Factory\TransportFactoryInterface
Chris@5 14 */
Chris@5 15 interface TransportInterface
Chris@5 16 {
Chris@5 17 /**
Chris@5 18 * Configure ourselves based on the settings of the process object
Chris@5 19 * (e.g. isTty()).
Chris@5 20 *
Chris@5 21 * @param \Consolidation\SiteProcess\SiteProcess $process
Chris@5 22 */
Chris@5 23 public function configure(SiteProcess $process);
Chris@5 24
Chris@5 25 /**
Chris@5 26 * wrapWithTransport examines the provided site alias; if it is a local
Chris@5 27 * alias, then the provided arguments are returned unmodified. If the
Chris@5 28 * alias points at a remote system, though, then the arguments are
Chris@5 29 * escaped and wrapped in an appropriate ssh command.
Chris@5 30 *
Chris@5 31 * @param array $args arguments provided by caller.
Chris@5 32 * @return array command and arguments to execute.
Chris@5 33 */
Chris@5 34 public function wrap($args);
Chris@5 35
Chris@5 36 /**
Chris@5 37 * addChdir adds an appropriate 'chdir' / 'cd' command for the transport.
Chris@5 38 */
Chris@5 39 public function addChdir($cd, $args);
Chris@5 40 }