Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Symfony\Component\Translation; Chris@0: Chris@0: /** Chris@0: * MetadataAwareInterface. Chris@0: * Chris@0: * @author Fabien Potencier Chris@0: */ Chris@0: interface MetadataAwareInterface Chris@0: { Chris@0: /** Chris@0: * Gets metadata for the given domain and key. Chris@0: * Chris@0: * Passing an empty domain will return an array with all metadata indexed by Chris@0: * domain and then by key. Passing an empty key will return an array with all Chris@0: * metadata for the given domain. Chris@0: * Chris@0: * @param string $key The key Chris@0: * @param string $domain The domain name Chris@0: * Chris@0: * @return mixed The value that was set or an array with the domains/keys or null Chris@0: */ Chris@0: public function getMetadata($key = '', $domain = 'messages'); Chris@0: Chris@0: /** Chris@0: * Adds metadata to a message domain. Chris@0: * Chris@0: * @param string $key The key Chris@0: * @param mixed $value The value Chris@0: * @param string $domain The domain name Chris@0: */ Chris@0: public function setMetadata($key, $value, $domain = 'messages'); Chris@0: Chris@0: /** Chris@0: * Deletes metadata for the given key and domain. Chris@0: * Chris@0: * Passing an empty domain will delete all metadata. Passing an empty key will Chris@0: * delete all metadata for the given domain. Chris@0: * Chris@0: * @param string $key The key Chris@0: * @param string $domain The domain name Chris@0: */ Chris@0: public function deleteMetadata($key = '', $domain = 'messages'); Chris@0: }