SizeAccessors
class SizeAccessors extends AbstractAccessors
Provides size object for {see StorageObjectInterface}.
Constants
SIZE_AUTO |
|
SIZE_B |
|
SIZE_KB |
|
SIZE_MB |
|
SIZE_GB |
|
SIZE_TB |
|
SIZE_PB |
|
SIZE_EB |
|
SIZE_YB |
|
Methods
from AbstractAccessors
string
__toString()
Returns size as a human readable string {see StorageObjectSize::getString()}.
float
toInteger(
string $unit = self::SIZE_B,
int $precision = 4)
Returns the size as bytes.
string
toString(
string $unit = self::SIZE_AUTO,
int $precision = 4)
Returns the size as a human readable string.
Details
in AbstractAccessors at line line 31
final
__construct(
StorageObjectProviderInterface $provider)
Construct using object provider instance.
at line line 34
string
__toString()
Returns size as a human readable string {see StorageObjectSize::getString()}.
at line line 47
float
toInteger(
string $unit = self::SIZE_B,
int $precision = 4)
Returns the size as bytes.
at line line 62
string
toString(
string $unit = self::SIZE_AUTO,
int $precision = 4)
Returns the size as a human readable string.