You are here

public function MessageCatalogue::deleteMetadata in Zircon Profile 8

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

Deletes metadata for the given key and domain.

Passing an empty domain will delete all metadata. Passing an empty key will delete all metadata for the given domain.

Parameters

string $key The key:

string $domain The domain name:

Overrides MetadataAwareInterface::deleteMetadata

File

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

Class

MessageCatalogue
MessageCatalogue.

Namespace

Symfony\Component\Translation

Code

public function deleteMetadata($key = '', $domain = 'messages') {
  if ('' == $domain) {
    $this->metadata = array();
  }
  elseif ('' == $key) {
    unset($this->metadata[$domain]);
  }
  else {
    unset($this->metadata[$domain][$key]);
  }
}