You are here

public function AbstractOperation::__construct in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/translation/Catalogue/AbstractOperation.php \Symfony\Component\Translation\Catalogue\AbstractOperation::__construct()

Parameters

MessageCatalogueInterface $source:

MessageCatalogueInterface $target:

Throws

\LogicException

File

vendor/symfony/translation/Catalogue/AbstractOperation.php, line 55

Class

AbstractOperation
Base catalogues binary operation class.

Namespace

Symfony\Component\Translation\Catalogue

Code

public function __construct(MessageCatalogueInterface $source, MessageCatalogueInterface $target) {
  if ($source
    ->getLocale() !== $target
    ->getLocale()) {
    throw new \LogicException('Operated catalogues must belong to the same locale.');
  }
  $this->source = $source;
  $this->target = $target;
  $this->result = new MessageCatalogue($source
    ->getLocale());
  $this->domains = null;
  $this->messages = array();
}