Continued drafting of fullpersonname

This commit is contained in:
Kevin Frantz
2018-11-10 13:09:18 +01:00
parent c1b073eba8
commit e57fd22f78
10 changed files with 133 additions and 24 deletions

View File

@@ -0,0 +1,7 @@
<?php
namespace App\Entity\Source\Combination;
class FullPersonNameSource extends AbstractCombinationSource implements FullPersonNameSourceInterface
{
}

View File

@@ -2,7 +2,6 @@
namespace App\Entity\Source\Combination;
use App\Entity\Source\Data\Name\FirstNameSourceInterface;
use App\Entity\Source\Data\Name\SurnameSourceInterface;
/**
@@ -12,10 +11,6 @@ use App\Entity\Source\Data\Name\SurnameSourceInterface;
*/
interface FullPersonNameSourceInterface extends CombinationSourceInterface
{
public function getFirstName(): FirstNameSourceInterface;
public function setFirstName(FirstNameSourceInterface $name): void;
public function getSurname(): SurnameSourceInterface;
public function setSurname(SurnameSourceInterface $name): void;

View File

@@ -0,0 +1,23 @@
<?php
namespace App\Entity\Source\Data;
use App\Entity\Attribut\FullPersonNameSourceAttribut;
use App\Entity\Source\Combination\FullPersonNameSourceInterface;
use App\Entity\Source\Combination\FullPersonNameSource;
class PersonIdentitySource extends AbstractDataSource implements PersonIdentitySourceInterface
{
use FullPersonNameSourceAttribut;
/**
* @var FullPersonNameSourceInterface
*/
protected $fullPersonNameSource;
public function __construct()
{
parent::__construct();
$this->fullPersonNameSource = new FullPersonNameSource();
}
}

View File

@@ -2,8 +2,8 @@
namespace App\Entity\Source\Data;
use App\Entity\Attribut\NameAttributInterface;
use App\Entity\Attribut\FullPersonNameSourceAttributInterface;
interface PersonIdentitySourceInterface extends DataSourceInterface, NameAttributInterface
interface PersonIdentitySourceInterface extends DataSourceInterface, FullPersonNameSourceAttributInterface
{
}

View File

@@ -1,16 +0,0 @@
<?php
namespace App\Entity\Source\Data;
class PesonIdentitySource extends AbstractDataSource implements PersonIdentitySourceInterface
{
/**
* @Assert\Type(type="App\Entity\Source\NameSource")
* @Assert\Valid()
* @ORM\OneToOne(targetEntity="NameSource",cascade={"persist", "remove"})
* @ORM\JoinColumn(name="name_id", referencedColumnName="id")
*
* @var NameSourceInterface
*/
protected $nameSource;
}