Mercurial > hg > cmmr2012-drupal-site
diff vendor/consolidation/site-process/src/Factory/TransportFactoryInterface.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/Factory/TransportFactoryInterface.php Thu May 09 15:34:47 2019 +0100 @@ -0,0 +1,34 @@ +<?php + +namespace Consolidation\SiteProcess\Factory; + +use Consolidation\SiteAlias\SiteAliasInterface; +use Consolidation\SiteProcess\Transport\TransportInterface; +use Consolidation\Config\ConfigInterface; + +/** + * TransportFactoryInterface defines a transport factory that is responsible + * for: + * + * - Determining whether a provided site alias is applicable to this transport + * - Creating an instance of a transport for an applicable site alias. + * + * There is always a transport for every factory, and visa-versa. + * @see Consolidation\SiteProcess\Transport\TransportInterface + */ +interface TransportFactoryInterface +{ + /** + * Check to see if a provided site alias is applicable to this transport type. + * @param SiteAliasInterface $siteAlias + * @return bool + */ + public function check(SiteAliasInterface $siteAlias); + + /** + * Create a transport instance for an applicable site alias. + * @param SiteAliasInterface $siteAlias + * @return TransportInterface + */ + public function create(SiteAliasInterface $siteAlias); +}