You are here

public function AbstractOperation::__construct in Plug 7

Parameters

MessageCatalogueInterface $source:

MessageCatalogueInterface $target:

Throws

\LogicException

File

lib/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();
}