Documentation

Filesize
in package

Table of Contents

$units  : mixed
$bytes  : int
The length of the data in bytes.
__construct()  : mixed
Creates the formatter with the passed value
__toString()  : mixed
getSize()  : mixed
parse()  : Filesize
Parses the size provided as a string and returns a Filesize instance or throws on failure.

Properties

$units

public static mixed $units = array('', 'K', 'M', 'G', 'T')

$bytes

The length of the data in bytes.

private int $bytes

Methods

__construct()

Creates the formatter with the passed value

public __construct(int $value) : mixed
Parameters
$value : int
Return values
mixed

__toString()

public __toString() : mixed
Return values
mixed

getSize()

public getSize() : mixed
Return values
mixed

parse()

Parses the size provided as a string and returns a Filesize instance or throws on failure.

public static parse(string $str) : Filesize
Parameters
$str : string
Tags
throws
PrivateException
Return values
Filesize

Search results