CoreFiles by mySites.guru
DataFormatterInterface.php42 lines, 904 bytes, from Joomla_4.1.1-rc1-Release_Candidate-Full_Package.zip
Raw History Compare with 4.1.0-rc4
md5
d2397d0b4ccab0e4a3f515ed2d69f945
sha1
fa731b925447822fb1d7029637207acd56c36e99
sha256
2e6417e1a445202063d01b29466a5d3504bdc776010a924153ce776e68faf438
<?php
/*
 * This file is part of the DebugBar package.
 *
 * (c) 2013 Maxime Bouroumeau-Fuseau
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace DebugBar\DataFormatter;

/**
 * Formats data to be outputed as string
 */
interface DataFormatterInterface
{
    /**
     * Transforms a PHP variable to a string representation
     *
     * @param mixed $data
     * @return string
     */
    function formatVar($data);

    /**
     * Transforms a duration in seconds in a readable string
     *
     * @param float $seconds
     * @return string
     */
    function formatDuration($seconds);

    /**
     * Transforms a size in bytes to a human readable string
     *
     * @param string $size
     * @param integer $precision
     * @return string
     */
    function formatBytes($size, $precision = 2);
}

The same content is in 152 releases, Joomla 4.1.1-rc1 to 5.3.0-alpha3. See them all, or every version of this file.