FdchXMLTransmitter
extends DomainObject
in package
A representation of our Partners receiving Forum Dateaustausch XML Invoices It contains the data of the <pre>mod_xml</pre> table
Tags
Table of Contents
Constants
- AK = '7611910000030'
- GLN of Ärztekasse
- ASELA = '7601001400078'
- GLN of Asela aka Jucker
- BC = '7601001405530'
- GLN of BillCare HNet
- BC1 = '7601001402409'
- GLN of BillCare MediData @deprecated
- DIRTY = 1
- GHOST = 2
- LOADED = 4
- LOADING = 3
- NEW = 0
Properties
- $gln : EAN13
- $glnKT : EAN13
- $id : Intkey
- $ownerId : Integer
- $sendEA : Boolean
- $sendGM : Boolean
- $sendKT : Boolean
- $sendKV : Boolean
- $sendOnlyKV : bool
- $data : array<string|int, DataType>
- $dataTypes : array<string|int, Value>
- Contains all configured fields with their respective Values
- $dirty : array<string|int, bool>
- $isDirty : bool
- $state : int
- $valid : bool
- $validated : bool
- $validator : Validator
- $violations : Violations|null
Methods
- __construct() : void
- Creates a new DomainObject
- __get() : Value|mixed
- Returnes the {@link \VeruA\DomainObjects\DataType} of the requested field
- __isset() : mixed
- __set() : mixed
- Sets a value instatiating a new DataType Object if none is set, or sets the value of the DataType
- __toString() : mixed
- __unset() : mixed
- current() : mixed
- dataTypes() : array<string|int, mixed>
- Returns the DataType configuration
- defaultValidators() : array<string|int, mixed>
- Overwrite this message if a DataType needs validation methods that are always applied
- getValueObjectOf() : Value
- in() : mixed
- is() : mixed
- Accepts GLNs to check against $this->gln to see if the transmitter is one of them
- isDirty() : bool
- isGhost() : bool
- isNew() : bool
- isValid() : bool
- Returns if this DMO is valid.
- key() : mixed
- load() : mixed
- Puts all fields of $dmo into this DomainObject.
- markDirty() : mixed
- markGhost() : mixed
- markLoaded() : mixed
- markNew() : mixed
- next() : mixed
- out() : mixed
- rewind() : mixed
- sends() : bool
- Checks if the transmitter sends a certain type of invoices
- sendsOnlyKV() : bool
- true if the transmitter sends only KV invoices
- valid() : mixed
- validate() : bool|ResultCollection
- Validates the Object.
- value() : mixed
- values() : array<string|int, mixed>
- Returns the internal data Array, containing all the DataType Objects
- violations() : ResultCollection
- fields() : array<string|int, mixed>
- Configures the DomainObjects Fields
Constants
AK
GLN of Ärztekasse
public
mixed
AK
= '7611910000030'
ASELA
GLN of Asela aka Jucker
public
mixed
ASELA
= '7601001400078'
BC
GLN of BillCare HNet
public
mixed
BC
= '7601001405530'
BC1
GLN of BillCare MediData @deprecated
public
mixed
BC1
= '7601001402409'
DIRTY
protected
mixed
DIRTY
= 1
GHOST
protected
mixed
GHOST
= 2
LOADED
protected
mixed
LOADED
= 4
LOADING
protected
mixed
LOADING
= 3
NEW
protected
mixed
NEW
= 0
Properties
$gln
public
EAN13
$gln
gln of the transmitter
$glnKT
public
EAN13
$glnKT
gln for sending KT invoices - probably not used anymore
$id
public
Intkey
$id
The pk of the client
$ownerId
public
Integer
$ownerId
id of the owner
$sendEA
public
Boolean
$sendEA
transmitter sends EA invoices
$sendGM
public
Boolean
$sendGM
transmitter sends GM invoices
$sendKT
public
Boolean
$sendKT
transmitter sends KT invoices
$sendKV
public
Boolean
$sendKV
transmitter sends KV invoices
$sendOnlyKV read-only
public
bool
$sendOnlyKV
true if all but sendKV are false
$data
protected
array<string|int, DataType>
$data
= []
Contains the ValueObjects with their respective values
$dataTypes
Contains all configured fields with their respective Values
protected
array<string|int, Value>
$dataTypes
= []
gets assigned in the constructor by running the fields() method
Tags
$dirty
protected
array<string|int, bool>
$dirty
= []
array that contains every field as key that changed after construction with value true
$isDirty
protected
bool
$isDirty
= false
$state
protected
int
$state
= self::DIRTY
state
$valid
protected
bool
$valid
= false
$validated
protected
bool
$validated
= false
$validator
protected
Validator
$validator
the Validator in use
$violations
protected
Violations|null
$violations
= null
Methods
__construct()
Creates a new DomainObject
public
__construct([Key|array<string|int, mixed> $data = null ]) : void
The DomainObject can be created in the following ways:
- If an Object of Type ValueObjects\Key is passed, the DomainObjects state is GHOST and will be loaded according to the DataSource, when a field is accessed
- Without a parameter an empty DomainObject is created in the NEW state
- If $data is an array, it has to be in the form 'field => 'value' as configured in the fields method
Parameters
- $data : Key|array<string|int, mixed> = null
-
Sets the values of the DomainObject. Every value is passed to the respective or if a Key is passed a new empty GHOST is created
Tags
__get()
Returnes the {@link \VeruA\DomainObjects\DataType} of the requested field
public
__get(mixed $field) : Value|mixed
Parameters
- $field : mixed
Return values
Value|mixed —Returns the DataType of the field
__isset()
public
__isset(mixed $field) : mixed
Parameters
- $field : mixed
__set()
Sets a value instatiating a new DataType Object if none is set, or sets the value of the DataType
public
__set(string $name, mixed $value) : mixed
Parameters
- $name : string
-
The name of the field
- $value : mixed
-
The value
Tags
__toString()
public
__toString() : mixed
__unset()
public
__unset(mixed $name) : mixed
Parameters
- $name : mixed
current()
public
current() : mixed
dataTypes()
Returns the DataType configuration
public
dataTypes() : array<string|int, mixed>
Return values
array<string|int, 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>getValueObjectOf()
public
getValueObjectOf(string $field) : Value
Parameters
- $field : string
Return values
Valuein()
public
in(mixed $dmo) : mixed
Parameters
- $dmo : mixed
is()
Accepts GLNs to check against $this->gln to see if the transmitter is one of them
public
is(mixed ...$txGln) : mixed
Parameters
- $txGln : mixed
isDirty()
public
isDirty() : bool
Return values
boolisGhost()
public
isGhost() : bool
Return values
boolisNew()
public
isNew() : bool
Return values
boolisValid()
Returns if this DMO is valid.
public
isValid([Validator|null $validator = null ]) : bool
If the DMO is not in a validated state, or because it was not already validated, or because changes has been made, it is validated. If a validator is given as argument, the DMO is always validated and the internal state is not altered
Parameters
- $validator : Validator|null = null
Return values
boolkey()
public
key() : mixed
load()
Puts all fields of $dmo into this DomainObject.
public
load(DomainObject $dmo) : mixed
Parameters
- $dmo : DomainObject
-
a DomainObject
markDirty()
public
markDirty() : mixed
markGhost()
public
markGhost() : mixed
markLoaded()
public
markLoaded() : mixed
markNew()
public
markNew() : mixed
next()
public
next() : mixed
out()
public
out() : mixed
rewind()
public
rewind() : mixed
sends()
Checks if the transmitter sends a certain type of invoices
public
sends(mixed $type) : bool
Parameters
- $type : mixed
-
one of
'kv', 'kt', 'gm', 'ea'or'kanton', 'gemeinde', 'klient'case does not matter
Tags
Return values
boolsendsOnlyKV()
true if the transmitter sends only KV invoices
public
sendsOnlyKV() : bool
Return values
boolvalid()
public
valid() : mixed
validate()
Validates the Object.
public
validate([Validator|null $validator = null ]) : bool|ResultCollection
Parameters
- $validator : Validator|null = null
Return values
bool|ResultCollection —Returns true if validation passed or a ResultCollection
value()
public
value() : mixed
values()
Returns the internal data Array, containing all the DataType Objects
public
values() : array<string|int, mixed>
Return values
array<string|int, mixed>violations()
public
violations() : ResultCollection
Return values
ResultCollection —Returns true if validation passed or a ResultCollection
fields()
Configures the DomainObjects Fields
protected
fields(array<string|int, mixed> ...$superFields) : array<string|int, mixed>
Overwrite this method to assign the filds with their respective ValueObjects make sure to call the parent an pass along all of the $superFields arrays like so ...$superFields The concept is simple. Every SuperClass adds its fields in a separate array, and passes them to the parent, DomainObject::fields merges them together to have all of the inherited fields available
Parameters
- $superFields : array<string|int, mixed>