Mercurial > hg > cmmr2012-drupal-site
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vendor/consolidation/site-process/src/Transport/TransportInterface.php Thu May 09 15:34:47 2019 +0100 @@ -0,0 +1,40 @@ +<?php + +namespace Consolidation\SiteProcess\Transport; + +use Consolidation\SiteProcess\SiteProcess; + +/** + * SshTransport knows how to wrap a command such that it runs on a remote + * system via the ssh cli. + * + * There is always a transport for every factory, and visa-versa. + * + * @see Consolidation\SiteProcess\Factory\TransportFactoryInterface + */ +interface TransportInterface +{ + /** + * Configure ourselves based on the settings of the process object + * (e.g. isTty()). + * + * @param \Consolidation\SiteProcess\SiteProcess $process + */ + public function configure(SiteProcess $process); + + /** + * wrapWithTransport examines the provided site alias; if it is a local + * alias, then the provided arguments are returned unmodified. If the + * alias points at a remote system, though, then the arguments are + * escaped and wrapped in an appropriate ssh command. + * + * @param array $args arguments provided by caller. + * @return array command and arguments to execute. + */ + public function wrap($args); + + /** + * addChdir adds an appropriate 'chdir' / 'cd' command for the transport. + */ + public function addChdir($cd, $args); +}