tinyib/inc/gettext/src/Generators/Generator.php
2020-08-31 20:52:57 -07:00

23 lines
444 B
PHP

<?php
namespace Gettext\Generators;
use Gettext\Translations;
abstract class Generator implements GeneratorInterface
{
/**
* {@inheritdoc}
*/
public static function toFile(Translations $translations, $file, array $options = [])
{
$content = static::toString($translations, $options);
if (file_put_contents($file, $content) === false) {
return false;
}
return true;
}
}