Documentation

AHV extends EAN13
in package

An implementation of AHV

Tags
todo

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

used-by
Client
used-by
Invoice

Table of Contents

Properties

$value  : mixed

Methods

__construct()  : mixed
The constructor is normally called from the DomainObject when instatiated.
__toString()  : string
Make sure to overwrite this method in the implementations
checkdigit()  : mixed
defaultValidators()  : array<string|int, mixed>
Overwrite this message if a DataType needs validation methods that are always applied
equals()  : bool
Compares the EAN13-Numbers internal value
ifExists()  : callable
in()  : mixed
Converts the $value stripping of all dots
isComplex()  : bool
length()  : callable
maxLength()  : callable
minLength()  : callable
notBlank()  : callable
NotBlank
notNull()  : callable
NotNull
oneOf()  : callable
out()  : string
returns the value with the AHV typical dots on the correct places
required()  : callable
unique()  : callable
not implemented - remove?
value()  : mixed
Returns the internal value

Properties

$value

protected mixed $value

The internal value of the DataType

Methods

__construct()

The constructor is normally called from the DomainObject when instatiated.

public __construct([mixde $value = null ]) : mixed
Parameters
$value : mixde = null

__toString()

Make sure to overwrite this method in the implementations

public __toString() : string
Return values
string

The value as is

checkdigit()

public static checkdigit() : mixed

defaultValidators()

Overwrite this message if a DataType needs validation methods that are always applied

public static defaultValidators() : array<string|int, mixed>
Return values
array<string|int, mixed>

equals()

Compares the EAN13-Numbers internal value

public equals(EAN13|string $compare) : bool
Parameters
$compare : EAN13|string

the EAN Number to be compared with the datatypes one

Return values
bool

ifExists()

public static ifExists(callable $test) : callable
Parameters
$test : callable
Return values
callable

Returns a predicate that tests a value using $test if it exists.

in()

Converts the $value stripping of all dots

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

isComplex()

public isComplex() : bool
Return values
bool

length()

public static length(int $n) : callable
Parameters
$n : int
Return values
callable

Returns a predicate that tests if its argument is of length $n.

maxLength()

public static maxLength(int $n) : callable
Parameters
$n : int
Return values
callable

Returns a predicate that tests if its argument is of length $n or less.

minLength()

public static minLength(int $n) : callable
Parameters
$n : int
Return values
callable

Returns a predicate that tests if its argument is of length $n or greater.

notBlank()

NotBlank

public static notBlank() : callable
Return values
callable

notNull()

NotNull

public static notNull() : callable
Return values
callable

oneOf()

public static oneOf(mixed $lst) : callable
Parameters
$lst : mixed
Return values
callable

Returns a predicate that test if it's argument is one of several elements.

out()

returns the value with the AHV typical dots on the correct places

public out() : string
Return values
string

required()

public static required() : callable
Return values
callable

Returns a predicate that tests for the existence of it's argument.

unique()

not implemented - remove?

public static unique() : callable
Return values
callable

Returns a predicate that tests if it's argument is unique in it's environment.

value()

Returns the internal value

public value() : mixed

        
On this page

Search results