comparison vendor/consolidation/site-process/src/Factory/SshTransportFactory.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
comparison
equal deleted inserted replaced
4:a9cd425dd02b 5:12f9dff5fda9
1 <?php
2
3 namespace Consolidation\SiteProcess\Factory;
4
5 use Consolidation\SiteAlias\SiteAliasInterface;
6 use Consolidation\SiteProcess\Transport\SshTransport;
7 use Consolidation\Config\ConfigInterface;
8
9 /**
10 * SshTransportFactory will create an SshTransport for applicable site aliases.
11 */
12 class SshTransportFactory implements TransportFactoryInterface
13 {
14 /**
15 * @inheritdoc
16 */
17 public function check(SiteAliasInterface $siteAlias)
18 {
19 // TODO: deprecate and eventually remove 'isRemote()', and move the logic here.
20 return $siteAlias->isRemote();
21 }
22
23 /**
24 * @inheritdoc
25 */
26 public function create(SiteAliasInterface $siteAlias)
27 {
28 return new SshTransport($siteAlias);
29 }
30 }