You are here

interface ChainCountryResolverInterface in Price 2.0.x

Same name and namespace in other branches
  1. 8 src/Resolver/ChainCountryResolverInterface.php \Drupal\price\Resolver\ChainCountryResolverInterface
  2. 3.x src/Resolver/ChainCountryResolverInterface.php \Drupal\price\Resolver\ChainCountryResolverInterface
  3. 2.x src/Resolver/ChainCountryResolverInterface.php \Drupal\price\Resolver\ChainCountryResolverInterface
  4. 3.0.x src/Resolver/ChainCountryResolverInterface.php \Drupal\price\Resolver\ChainCountryResolverInterface

Runs the added resolvers one by one until one of them returns the country.

Each resolver in the chain can be another chain, which is why this interface extends the country resolver one.

Hierarchy

Expanded class hierarchy of ChainCountryResolverInterface

All classes that implement ChainCountryResolverInterface

1 file declares its use of ChainCountryResolverInterface
CurrentCountry.php in src/CurrentCountry.php

File

src/Resolver/ChainCountryResolverInterface.php, line 11

Namespace

Drupal\price\Resolver
View source
interface ChainCountryResolverInterface extends CountryResolverInterface {

  /**
   * Adds a resolver.
   *
   * @param \Drupal\price\Resolver\CountryResolverInterface $resolver
   *   The resolver.
   */
  public function addResolver(CountryResolverInterface $resolver);

  /**
   * Gets all added resolvers.
   *
   * @return \Drupal\price\Resolver\CountryResolverInterface[]
   *   The resolvers.
   */
  public function getResolvers();

}

Members

Namesort descending Modifiers Type Description Overrides
ChainCountryResolverInterface::addResolver public function Adds a resolver. 1
ChainCountryResolverInterface::getResolvers public function Gets all added resolvers. 1
CountryResolverInterface::resolve public function Resolves the country. 2