You are here

interface ChainLocaleResolverInterface in Price 2.0.x

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

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

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

Hierarchy

Expanded class hierarchy of ChainLocaleResolverInterface

All classes that implement ChainLocaleResolverInterface

1 file declares its use of ChainLocaleResolverInterface
CurrentLocale.php in src/CurrentLocale.php

File

src/Resolver/ChainLocaleResolverInterface.php, line 11

Namespace

Drupal\price\Resolver
View source
interface ChainLocaleResolverInterface extends LocaleResolverInterface {

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

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

}

Members

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