$82 GRAYBYTE WORDPRESS FILE MANAGER $69

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/php55/usr/share/pear/Symfony/Component/Translation/Dumper/

HOME
Current File : /opt/alt/php55/usr/share/pear/Symfony/Component/Translation/Dumper//CsvFileDumper.php
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * 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;

/**
 * CsvFileDumper generates a csv formatted string representation of a message catalogue.
 *
 * @author Stealth35
 */
class CsvFileDumper extends FileDumper
{
    private $delimiter = ';';
    private $enclosure = '"';

    /**
     * {@inheritDoc}
     */
    public function format(MessageCatalogue $messages, $domain = 'messages')
    {
        $handle = fopen('php://memory', 'rb+');

        foreach ($messages->all($domain) as $source => $target) {
            fputcsv($handle, array($source, $target), $this->delimiter, $this->enclosure);
        }

        rewind($handle);
        $output = stream_get_contents($handle);
        fclose($handle);

        return $output;
    }

    /**
     * Sets the delimiter and escape character for CSV.
     *
     * @param string $delimiter delimiter character
     * @param string $enclosure enclosure character
     */
    public function setCsvControl($delimiter = ';', $enclosure = '"')
    {
        $this->delimiter = $delimiter;
        $this->enclosure = $enclosure;
    }

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


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.54 PM
root / root
0755
CsvFileDumper.php
1.45 KB
18 Dec 2019 11.24 AM
root / root
0644
DumperInterface.php
0.791 KB
18 Dec 2019 11.24 AM
root / root
0644
FileDumper.php
1.839 KB
18 Dec 2019 11.24 AM
root / root
0644
IcuResFileDumper.php
3.642 KB
18 Dec 2019 11.24 AM
root / root
0644
IniFileDumper.php
0.961 KB
18 Dec 2019 11.24 AM
root / root
0644
JsonFileDumper.php
0.872 KB
18 Dec 2019 11.24 AM
root / root
0644
MoFileDumper.php
2.313 KB
18 Dec 2019 11.24 AM
root / root
0644
PhpFileDumper.php
0.824 KB
18 Dec 2019 11.24 AM
root / root
0644
PoFileDumper.php
1.502 KB
18 Dec 2019 11.24 AM
root / root
0644
QtFileDumper.php
1.319 KB
18 Dec 2019 11.24 AM
root / root
0644
XliffFileDumper.php
1.93 KB
18 Dec 2019 11.24 AM
root / root
0644
YamlFileDumper.php
0.803 KB
18 Dec 2019 11.24 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF