FloatMeasure
class FloatMeasure extends Measure
FloatMeasure is a Measure for Float values.
Traits
Constants
DIMENSIONLESS |
measurement is dimensionless |
BYTES |
measurement in bytes |
MILLISECONDS |
measurement in milliseconds |
NAME_MAX_LENGTH |
|
EX_NAME_EXISTS |
|
EX_INVALID_NAME |
|
Properties
static protected array | $map | Contains our initialized Measure's | from Measure |
protected string | $name | Holds our Measure's name. | from Measure |
protected string | $description | Holds our measure's human readable description. | from Measure |
protected string | $unit | Holds the unit type of the value this measure takes on. | from Measure |
Methods
Discription returns the human-readable description of this measure.
Constructs a new IntMeasure.
Constructs a new FloatMeasure.
Constructs a new FloatMeasure.
Creates a Measurement of provided value.
Details
in Measure at line 94
string
getName()
Name returns the name of this measure.
Measure names are globally unique (among all libraries linked into your program). We recommend prefixing the measure name with a domain name relevant to your project or application.
Measure names are never exported to backends. They are only used to create Views.
in Measure at line 104
string
getDescription()
Discription returns the human-readable description of this measure.
in Measure at line 117
string
getUnit()
Unit returns the units for the values this measure takes on.
Units are encoded according to the case-sensitive abbreviations from the Unified Code for Units of Measure.
in Measure at line 132
static IntMeasure
newIntMeasure(string $name, string $description, string $unit)
Constructs a new IntMeasure.
in Measure at line 147
static FloatMeasure
newFloatMeasure(string $name, string $description, string $unit)
Constructs a new FloatMeasure.
at line 52
final static FloatMeasure
create(string $name, string $description = "", string $unit = Measure::DIMENSIONLESS)
Constructs a new FloatMeasure.
at line 66
final Measurement
m(float $value)
Creates a Measurement of provided value.