diff --git a/application/src/Entity/Attribut/SurnameSourceAttribut.php b/application/src/Entity/Attribut/SurnameSourceAttribut.php new file mode 100644 index 0000000..c7bbd5a --- /dev/null +++ b/application/src/Entity/Attribut/SurnameSourceAttribut.php @@ -0,0 +1,12 @@ +surnameSource; + } + + public function setSurname(SurnameSourceInterface $name): void + { + $this->surnameSource = $name; + } +} diff --git a/application/src/Entity/Source/Combination/FullPersonNameSource.php b/application/src/Entity/Source/Combination/FullPersonNameSource.php index 1681e50..94e9cb3 100644 --- a/application/src/Entity/Source/Combination/FullPersonNameSource.php +++ b/application/src/Entity/Source/Combination/FullPersonNameSource.php @@ -2,6 +2,10 @@ namespace App\Entity\Source\Combination; +use App\Entity\Attribut\FirstNameSourceAttribut; +use App\Entity\Attribut\SurnameSourceAttribut; + class FullPersonNameSource extends AbstractCombinationSource implements FullPersonNameSourceInterface { + use FirstNameSourceAttribut,SurnameSourceAttribut; } diff --git a/application/src/Entity/Source/Combination/FullPersonNameSourceInterface.php b/application/src/Entity/Source/Combination/FullPersonNameSourceInterface.php index 44fb443..5643bd6 100644 --- a/application/src/Entity/Source/Combination/FullPersonNameSourceInterface.php +++ b/application/src/Entity/Source/Combination/FullPersonNameSourceInterface.php @@ -2,16 +2,14 @@ namespace App\Entity\Source\Combination; -use App\Entity\Source\Data\Name\SurnameSourceInterface; +use App\Entity\Attribut\FirstNameSourceAttributInterface; +use App\Entity\Attribut\SurnameSourceAttributInterface; /** * @todo Maybe a middle name would be helpfull in the future ;) * * @author kevinfrantz */ -interface FullPersonNameSourceInterface extends CombinationSourceInterface +interface FullPersonNameSourceInterface extends CombinationSourceInterface, FirstNameSourceAttributInterface, SurnameSourceAttributInterface { - public function getSurname(): SurnameSourceInterface; - - public function setSurname(SurnameSourceInterface $name): void; } diff --git a/application/src/Entity/Source/Data/Name/AbstractNameSource.php b/application/src/Entity/Source/Data/Name/AbstractNameSource.php index 8b95e59..464bbea 100644 --- a/application/src/Entity/Source/Data/Name/AbstractNameSource.php +++ b/application/src/Entity/Source/Data/Name/AbstractNameSource.php @@ -3,7 +3,9 @@ namespace App\Entity\Source\Data\Name; use App\Entity\Source\Data\AbstractDataSource; +use App\Entity\Attribut\NameAttribut; abstract class AbstractNameSource extends AbstractDataSource implements NameSourceInterface { + use NameAttribut; }