Documentation

ByteSize
in package

Main component class

Tags
author

Ryan Chouinard rchouinard@gmail.com

copyright

Copyright (c) 2013, Ryan Chouinard

license

MIT License - http://www.opensource.org/licenses/mit-license.php

Table of Contents

Properties

$formatter  : FormatterInterface

Methods

__construct()  : void
Class constructor.
format()  : string
Proxy method for the formatter's format() method.
formatBinary()  : string
Static proxy to the binary formatter's format() method.
formatMetric()  : string
Static proxy to the metric formatter's format() method.

Properties

Methods

format()

Proxy method for the formatter's format() method.

public format(int|string $bytes[, int $precision = null ]) : string
Parameters
$bytes : int|string

Integer or string representing the number of bytes.

$precision : int = null

Number of significant digits to include in the formatted output.

Return values
string

Returns a human-friendly formatted string.

formatBinary()

Static proxy to the binary formatter's format() method.

public static formatBinary(int|string $bytes[, int $precision = null ]) : string
Parameters
$bytes : int|string

Integer or string representing the number of bytes.

$precision : int = null

Number of significant digits to include in the formatted output.

Tags
staticvar

\Rych\ByteSize\Formatter\Binary $formatter

uses
Binary::format()
Return values
string

Returns a human-friendly formatted string.

formatMetric()

Static proxy to the metric formatter's format() method.

public static formatMetric(int|string $bytes[, int $precision = null ]) : string
Parameters
$bytes : int|string

Integer or string representing the number of bytes.

$precision : int = null

Number of significant digits to include in the formatted output.

Tags
staticvar

\Rych\ByteSize\Formatter\Metric $formatter

uses
Metric::format()
Return values
string

Returns a human-friendly formatted string.


        
On this page

Search results