You are here

public function MessageCatalogue::deleteMetadata in Plug 7

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

lib/Symfony/translation/MessageCatalogue.php, line 269

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]);
  }
}