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
- equals() : bool
- Compare two objects
- value() : float
- Get depth value
- isValid() : bool
- Check if depth value is valid
Properties
$validValues
private
mixed
$validValues
= array('min' => -100, 'max' => 10000)
$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
equals()
Compare two objects
public
equals(self $other) : bool
Parameters
- $other : self
Return values
bool —true are equals, false otherwise
value()
Get depth value
public
value() : float
Return values
float —Depth value
isValid()
Check if depth value is valid
private
isValid(float $value) : bool
Parameters
- $value : float
Return values
bool —True if is valid, false otherwise