Documentation

Integer extends DataType
in package

An implementation of AHV

Tags
todo

rename to EAN and extend to use for arbitrary EAN encoded values

Table of Contents

$validators  : array<string|int, callable>
$value  : mixed
__construct()  : mixed
The constructor is normally called from the DataObject when instatiated.
__toString()  : string
Make sure to overwrite this method in the implementations
equals()  : mixed
Compares the boolean value
in()  : mixed
Stores the $value as int casting it
out()  : mixed
Returns the $value applying the output filters
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 = []

Methods

__construct()

The constructor is normally called from the DataObject when instatiated.

public __construct([mixde $value = null ][, array<string|int, mixed> $props = [] ]) : mixed

Inside the constructor the validator callables are generated and saved in the $validators member
When a concrete implementation of DataType is written, make sure to call the parent constructor to have the validators in place

Parameters
$value : mixde = null
$props : array<string|int, mixed> = []

The properties for the standard validators

Return values
mixed

__toString()

Make sure to overwrite this method in the implementations

public __toString() : string
Return values
string

The string representation of the DataType

equals()

Compares the boolean value

public equals(mixed $compare) : mixed
Parameters
$compare : mixed

The value to be compared

Return values
mixed

in()

Stores the $value as int casting it

public in(mixed $value) : mixed
Parameters
$value : mixed
Return values
mixed

out()

Returns the $value applying the output filters

public out() : mixed

This method should be overwritten in the concrete implementation

Tags
todo

Filters are yet to be implemented!

Return values
mixed

raw()

Returns the value without processing it

public raw() : mixed
Tags
deprecated

use value()

Return values
mixed

validate()

Runs all registered validators

public validate() : true
Tags
throws
ValidatorException
Return values
true

if validations was succsessful

value()

Returns the internal value

public value() : mixed
Return values
mixed

Search results