CoreFiles by mySites.guru
DataFormatterInterface.php42 lines, 903 bytes, from Joomla_4.0.0-alpha12-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha11
md5
894a4d6b566d20ef42b1ba599722675e
sha1
da7d92c4e5fefdb791b506b0af5c581bdae05d99
sha256
af7bfd65174bccfb8ea954fb2ba9ffd044e775a8617baa5a5ecde89c95a4962e
<?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 $var
     * @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 48 releases, Joomla 4.0.0-alpha5 to 4.1.0. See them all, or every version of this file.