You are here

public function MessageCatalogue::addResource in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/translation/MessageCatalogue.php \Symfony\Component\Translation\MessageCatalogue::addResource()

Adds a resource for this collection.

Parameters

ResourceInterface $resource A resource instance:

Overrides MessageCatalogueInterface::addResource

2 calls to MessageCatalogue::addResource()
MessageCatalogue::addCatalogue in vendor/symfony/translation/MessageCatalogue.php
Merges translations from the given Catalogue into the current one.
MessageCatalogue::addFallbackCatalogue in vendor/symfony/translation/MessageCatalogue.php
Merges translations from the given Catalogue into the current one only when the translation does not exist.

File

vendor/symfony/translation/MessageCatalogue.php, line 210

Class

MessageCatalogue
MessageCatalogue.

Namespace

Symfony\Component\Translation

Code

public function addResource(ResourceInterface $resource) {
  $this->resources[$resource
    ->__toString()] = $resource;
}