AHV
extends DataType
in package
An implementation of AHV
Tags
Table of Contents
- $validators : array<string|int, callable>
- $value : mixed
- __construct() : mixed
- adds an AHV validator
- __toString() : string
- Make sure to overwrite this method in the implementations
- equals() : mixed
- Compares the AHV-Numbers internal value
- in() : mixed
- Converts the $value stripping of all dots
- out() : mixed
- returns the value with the AHV typical dots on the correct places
- raw() : mixed
- Returns the value without processing it
- validate() : true
- Runs all registered validators
- value() : mixed
- Returns the internal value
Properties
$validators
protected
array<string|int, callable>
$validators
= []
$value
protected
mixed
$value
Methods
__construct()
adds an AHV validator
public
__construct([mixed $value = null ][, mixed $props = [] ]) : mixed
Parameters
- $value : mixed = null
- $props : mixed = []
-
The properties for the standard validators
Tags
Return values
mixed —__toString()
Make sure to overwrite this method in the implementations
public
__toString() : string
Return values
string —The value as is
equals()
Compares the AHV-Numbers internal value
public
equals(AHV|string $compare) : mixed
Parameters
- $compare : AHV|string
-
the AHV Number to be compared with the datatypes one
Return values
mixed —in()
Converts the $value stripping of all dots
public
in(mixed $value) : mixed
Parameters
- $value : mixed
Return values
mixed —out()
returns the value with the AHV typical dots on the correct places
public
out() : mixed
Return values
mixed —raw()
Returns the value without processing it
public
raw() : mixed
Tags
Return values
mixed —validate()
Runs all registered validators
public
validate() : true
Tags
Return values
true —if validations was succsessful
value()
Returns the internal value
public
value() : mixed