Added README.md for Attribut

This commit is contained in:
Kevin Frantz 2019-01-20 10:52:30 +01:00
parent e695aa26ea
commit 36c3c28a66

View File

@ -0,0 +1,15 @@
# Attribut
This folder containes the attributs which are used by entity, domain logic etc.
# Structure
Each attribut containes out of an interface and a trait.
## Interface
The interface MUST define a __get-__ and a __set-method__. Optional an interface can define a __has-method__.
### Methods
#### Set
The __setter__ MUST return nothing(void). It SHOULD throw an exception if the value is not valid.
#### Get
The __getter__ MUST return the attribute. Void is not allowed.
#### Has
__has__ must return an boolean. True if the attribut is defined, otherwise false.
## Trait
The trait represents the implementation of the interface. Also it contains an __private__ or __protected__ attribute, which is modified by the methods which are defined in the interface.