Update to Drupal 8.1.0. For more information, see https://www.drupal.org/drupal-8.1.0-release-notes

This commit is contained in:
Pantheon Automation 2016-04-20 09:56:34 -07:00 committed by Greg Anderson
parent b11a755ba8
commit c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions

View file

@ -82,10 +82,28 @@ abstract class FileDumper implements DumperInterface
}
}
// save file
file_put_contents($fullpath, $this->format($messages, $domain));
file_put_contents($fullpath, $this->formatCatalogue($messages, $domain, $options));
}
}
/**
* Transforms a domain of a message catalogue to its string representation.
*
* Override this function in child class if $options is used for message formatting.
*
* @param MessageCatalogue $messages
* @param string $domain
* @param array $options
*
* @return string representation
*/
public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array())
{
@trigger_error('The '.__METHOD__.' method will replace the format method in 3.0. You should overwrite it instead of overwriting format instead.', E_USER_DEPRECATED);
return $this->format($messages, $domain);
}
/**
* Transforms a domain of a message catalogue to its string representation.
*
@ -93,8 +111,13 @@ abstract class FileDumper implements DumperInterface
* @param string $domain
*
* @return string representation
*
* @deprecated since version 2.8, to be removed in 3.0. Overwrite formatCatalogue() instead.
*/
abstract protected function format(MessageCatalogue $messages, $domain);
protected function format(MessageCatalogue $messages, $domain)
{
throw new \LogicException('The "FileDumper::format" method needs to be overwritten, you should implement either "format" or "formatCatalogue".');
}
/**
* Gets the file extension of the dumper.