public function AbstractOperation::__construct in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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\CatalogueCode
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();
}