mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-09 22:17:26 +01:00
Implemented surname attribut and nameattribut
This commit is contained in:
parent
ea20f7562a
commit
69dbc58954
12
application/src/Entity/Attribut/SurnameSourceAttribut.php
Normal file
12
application/src/Entity/Attribut/SurnameSourceAttribut.php
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity\Attribut;
|
||||||
|
|
||||||
|
use App\Entity\Source\Data\Name\SurnameSourceInterface;
|
||||||
|
|
||||||
|
interface SurnameSourceAttributInterface
|
||||||
|
{
|
||||||
|
public function getSurname(): SurnameSourceInterface;
|
||||||
|
|
||||||
|
public function setSurname(SurnameSourceInterface $name): void;
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity\Attribut;
|
||||||
|
|
||||||
|
use App\Entity\Source\Data\Name\SurnameSourceInterface;
|
||||||
|
|
||||||
|
trait SurnameSourceAttribut
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var SurnameSourceInterface
|
||||||
|
*/
|
||||||
|
protected $surnameSource;
|
||||||
|
|
||||||
|
public function getSurname(): SurnameSourceInterface
|
||||||
|
{
|
||||||
|
return $this->surnameSource;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setSurname(SurnameSourceInterface $name): void
|
||||||
|
{
|
||||||
|
$this->surnameSource = $name;
|
||||||
|
}
|
||||||
|
}
|
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
namespace App\Entity\Source\Combination;
|
namespace App\Entity\Source\Combination;
|
||||||
|
|
||||||
|
use App\Entity\Attribut\FirstNameSourceAttribut;
|
||||||
|
use App\Entity\Attribut\SurnameSourceAttribut;
|
||||||
|
|
||||||
class FullPersonNameSource extends AbstractCombinationSource implements FullPersonNameSourceInterface
|
class FullPersonNameSource extends AbstractCombinationSource implements FullPersonNameSourceInterface
|
||||||
{
|
{
|
||||||
|
use FirstNameSourceAttribut,SurnameSourceAttribut;
|
||||||
}
|
}
|
||||||
|
@ -2,16 +2,14 @@
|
|||||||
|
|
||||||
namespace App\Entity\Source\Combination;
|
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 ;)
|
* @todo Maybe a middle name would be helpfull in the future ;)
|
||||||
*
|
*
|
||||||
* @author kevinfrantz
|
* @author kevinfrantz
|
||||||
*/
|
*/
|
||||||
interface FullPersonNameSourceInterface extends CombinationSourceInterface
|
interface FullPersonNameSourceInterface extends CombinationSourceInterface, FirstNameSourceAttributInterface, SurnameSourceAttributInterface
|
||||||
{
|
{
|
||||||
public function getSurname(): SurnameSourceInterface;
|
|
||||||
|
|
||||||
public function setSurname(SurnameSourceInterface $name): void;
|
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
namespace App\Entity\Source\Data\Name;
|
namespace App\Entity\Source\Data\Name;
|
||||||
|
|
||||||
use App\Entity\Source\Data\AbstractDataSource;
|
use App\Entity\Source\Data\AbstractDataSource;
|
||||||
|
use App\Entity\Attribut\NameAttribut;
|
||||||
|
|
||||||
abstract class AbstractNameSource extends AbstractDataSource implements NameSourceInterface
|
abstract class AbstractNameSource extends AbstractDataSource implements NameSourceInterface
|
||||||
{
|
{
|
||||||
|
use NameAttribut;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user