Depth
in package
Data structure to handle Depth value
Table of Contents
Properties
- $validValues : mixed
- $value : float
Methods
- __construct() : mixed
- __destruct() : mixed
- __toString() : string
- Get depth value
- value() : float
- Get depth value
- isValidValue() : bool
- Check if depth value is valid
Properties
$validValues
private
mixed
$validValues
= array('min' => -INF, 'max' => INF)
$value
private
float
$value
Methods
__construct()
public
__construct(float $value) : mixed
Parameters
- $value : float
__destruct()
public
__destruct() : mixed
__toString()
Get depth value
public
__toString() : string
Return values
string —Depth value in "%.2f km" format
value()
Get depth value
public
value() : float
Return values
float —Depth value
isValidValue()
Check if depth value is valid
private
isValidValue(float $value) : bool
Parameters
- $value : float
Return values
bool —True if is valid, false otherwise