PHP 8.2.30
Preview: JsonFileDumper.php Size: 893 B
/proc/self/root/opt/cloudlinux/alt-php53/root/usr/share/pear/Symfony/Component/Translation/Dumper/JsonFileDumper.php

<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Translation\Dumper;

use Symfony\Component\Translation\MessageCatalogue;

if (!defined('JSON_PRETTY_PRINT')) {
    define('JSON_PRETTY_PRINT', 128);
}

/**
 * JsonFileDumper generates an json formatted string representation of a message catalogue.
 *
 * @author singles
 */
class JsonFileDumper extends FileDumper
{
    /**
     * {@inheritDoc}
     */
    public function format(MessageCatalogue $messages, $domain = 'messages')
    {
        return json_encode($messages->all($domain), JSON_PRETTY_PRINT);
    }

    /**
     * {@inheritDoc}
     */
    protected function getExtension()
    {
        return 'json';
    }
}

Directory Contents

Dirs: 0 × Files: 12

Name Size Perms Modified Actions
1.45 KB lrw-r--r-- 2019-12-18 11:20:43
Edit Download
810 B lrw-r--r-- 2019-12-18 11:20:43
Edit Download
1.84 KB lrw-r--r-- 2019-12-18 11:20:43
Edit Download
3.64 KB lrw-r--r-- 2019-12-18 11:20:43
Edit Download
984 B lrw-r--r-- 2019-12-18 11:20:43
Edit Download
893 B lrw-r--r-- 2019-12-18 11:20:43
Edit Download
2.31 KB lrw-r--r-- 2019-12-18 11:20:43
Edit Download
844 B lrw-r--r-- 2019-12-18 11:20:43
Edit Download
1.50 KB lrw-r--r-- 2019-12-18 11:20:43
Edit Download
1.32 KB lrw-r--r-- 2019-12-18 11:20:43
Edit Download
1.93 KB lrw-r--r-- 2019-12-18 11:20:43
Edit Download
822 B lrw-r--r-- 2019-12-18 11:20:43
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).