Unit
Read onlyYes
FinalYes
Methods
- absolute() : self
- diff() : self
- fromBytes() : self
- fromGb() : self
- fromKb() : self
- fromMb() : self
- fromString() : self
- inBytes() : int
- inGb() : float
- inKb() : float
- inMb() : float
- isGreaterThan() : bool
- isLowerThan() : bool
- percentage() : self
Methods
absolute()
public
absolute() : self
Return values
selfdiff()
public
diff(self $unit) : self
Parameters
- $unit : self
Return values
selffromBytes()
public
static fromBytes(int $bytes) : self
Parameters
- $bytes : int
Return values
selffromGb()
public
static fromGb(int $gb) : self
Parameters
- $gb : int
Return values
selffromKb()
public
static fromKb(int $kb) : self
Parameters
- $kb : int
Return values
selffromMb()
public
static fromMb(int $mb) : self
Parameters
- $mb : int
Return values
selffromString()
public
static fromString(string $memoryString) : self
Parameters
- $memoryString : string
Tags
Return values
selfinBytes()
public
inBytes() : int
Return values
intinGb()
public
inGb([int $precision = 2 ]) : float
Parameters
- $precision : int = 2
Return values
floatinKb()
public
inKb([int $precision = 2 ]) : float
Parameters
- $precision : int = 2
Return values
floatinMb()
public
inMb([int $precision = 2 ]) : float
Parameters
- $precision : int = 2
Return values
floatisGreaterThan()
public
isGreaterThan(self $unit) : bool
Parameters
- $unit : self
Return values
boolisLowerThan()
public
isLowerThan(self $unit) : bool
Parameters
- $unit : self
Return values
boolpercentage()
public
percentage(int $value) : self
Parameters
- $value : int