Documentation

ToKibibits extends AbstractFormula

Formula to convert tebibits values to gibibits.

Tags
version
1.0.0
since
0.8.4
author

Jordan Brauer 18744334+jordanbrauer@users.noreply.github.com

Table of Contents

FORMULA_STRING  = 'Kib = Tib × 1.074e+9'
The string representation of the formula.
FORMULA_TEMPLATE  = 'Kib = %sTib × 1.074e+9'
The template of the formula for casting to a string after running an operation.
$calculator  : CalculatorInterface
The calculator to run the formula through.
$values  : array<string|int, mixed>
A one-dimensional array of values to plug into the formula template when this formula is casted to a string.
__construct()  : self
Public constructor method.
__toString()  : string
Return the string representation of this object.
describe()  : int|float|string
Return the result of a mathematical expression, representing an amount of units.
setCalculator()  : FormulaInterface
Explicitly sets the calculator for a formula.
plugVariables()  : void
Set the values (passed _**in order**_) to be used for the template for logging a complete version of the formula.

Constants

FORMULA_STRING

The string representation of the formula.

public mixed FORMULA_STRING = 'Kib = Tib × 1.074e+9'

FORMULA_TEMPLATE

The template of the formula for casting to a string after running an operation.

public mixed FORMULA_TEMPLATE = 'Kib = %sTib × 1.074e+9'

Properties

$values

A one-dimensional array of values to plug into the formula template when this formula is casted to a string.

protected array<string|int, mixed> $values = []

Methods

__toString()

Return the string representation of this object.

public __toString() : string
Return values
string

describe()

Return the result of a mathematical expression, representing an amount of units.

public describe(mixed $value, mixed $fromUnits, mixed $toUnits[, int $precision = null ]) : int|float|string
Parameters
$value : mixed
$fromUnits : mixed
$toUnits : mixed
$precision : int = null
Return values
int|float|string

plugVariables()

Set the values (passed _**in order**_) to be used for the template for logging a complete version of the formula.

protected plugVariables(mixed ...$variables) : void
Parameters
$variables : mixed

A variadic set of arguments, passed in order to fill the template with.

Return values
void

Search results