mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Continued the integration of person identity
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Combination;
|
||||
|
||||
use App\Entity\Source\AbstractSource;
|
||||
|
||||
abstract class AbstractCombinationSource extends AbstractSource implements CombinationSourceInterface
|
||||
abstract class AbstractCombinationSource extends AbstractSource implements CombinationSourceInterface
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Combination;
|
||||
|
||||
use App\Entity\Source\Data\DataSourceInterface;
|
||||
@@ -6,4 +7,3 @@ use App\Entity\Source\Data\DataSourceInterface;
|
||||
interface CombinationSourceInterface extends DataSourceInterface
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -1,21 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Combination;
|
||||
|
||||
use App\Entity\Source\Data\Name\FirstNameSourceInterface;
|
||||
use App\Entity\Source\Data\Name\SurnameSourceInterface;
|
||||
|
||||
/**
|
||||
* @todo Maybe a middle name would be helpfull in the future ;)
|
||||
* @author kevinfrantz
|
||||
* @todo Maybe a middle name would be helpfull in the future ;)
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
interface FullPersonNameSourceInterface extends CombinationSourceInterface
|
||||
{
|
||||
public function getFirstName():FirstNameSourceInterface;
|
||||
|
||||
public function setFirstName(FirstNameSourceInterface $name):void;
|
||||
|
||||
public function getSurname():SurnameSourceInterface;
|
||||
|
||||
public function setSurname(SurnameSourceInterface $name):void;
|
||||
}
|
||||
public function getFirstName(): FirstNameSourceInterface;
|
||||
|
||||
public function setFirstName(FirstNameSourceInterface $name): void;
|
||||
|
||||
public function getSurname(): SurnameSourceInterface;
|
||||
|
||||
public function setSurname(SurnameSourceInterface $name): void;
|
||||
}
|
||||
|
@@ -1,8 +0,0 @@
|
||||
<?php
|
||||
namespace App\Entity\Source\Data;
|
||||
|
||||
class IdentitySource extends AbstractDataSource implements IdentityInterface
|
||||
{
|
||||
|
||||
}
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Data;
|
||||
|
||||
use App\Entity\Attribut\NameAttributInterface;
|
||||
|
||||
interface IdentityInterface extends DataSourceInterface, NameAttributInterface
|
||||
interface PersonIdentitySourceInterface extends DataSourceInterface, NameAttributInterface
|
||||
{
|
||||
}
|
@@ -0,0 +1,16 @@
|
||||
<?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;
|
||||
}
|
@@ -3,10 +3,9 @@
|
||||
namespace App\Entity\Source\Data;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
use App\Entity\Attribut\UserAttribut;
|
||||
use App\Entity\Attribut\NameSourceAttribut;
|
||||
use App\Entity\UserInterface;
|
||||
use Entity\Attribut\PersonIdentityAttribut;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
@@ -15,7 +14,7 @@ use App\Entity\UserInterface;
|
||||
*/
|
||||
class UserSource extends AbstractDataSource implements UserSourceInterface
|
||||
{
|
||||
use UserAttribut,NameSourceAttribut;
|
||||
use UserAttribut,PersonIdentityAttribut;
|
||||
|
||||
/**
|
||||
* @ORM\OneToOne(targetEntity="App\Entity\User",cascade={"persist", "remove"})
|
||||
@@ -25,19 +24,8 @@ class UserSource extends AbstractDataSource implements UserSourceInterface
|
||||
*/
|
||||
protected $user;
|
||||
|
||||
/**
|
||||
* @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;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->nameSource = new NameSource();
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
|
@@ -3,11 +3,11 @@
|
||||
namespace App\Entity\Source\Data;
|
||||
|
||||
use App\Entity\Attribut\UserAttributInterface;
|
||||
use App\Entity\Attribut\NameSourceAttributInterface;
|
||||
use App\Entity\Attribut\PersonIdentitySourceAttributInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
interface UserSourceInterface extends DataSourceInterface, UserAttributInterface, NameSourceAttributInterface
|
||||
interface UserSourceInterface extends DataSourceInterface, UserAttributInterface, PersonIdentitySourceAttributInterface
|
||||
{
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Data\Name;
|
||||
|
||||
use App\Entity\Source\Data\AbstractDataSource;
|
||||
@@ -6,4 +7,3 @@ use App\Entity\Source\Data\AbstractDataSource;
|
||||
class AbstractNameSource extends AbstractDataSource implements NameSourceInterface
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Data\Name;
|
||||
|
||||
interface FirstNameSourceInterface extends NameSourceInterface
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Data\Name;
|
||||
|
||||
use App\Entity\Source\Data\DataSourceInterface;
|
||||
@@ -6,4 +7,4 @@ use App\Entity\Attribut\NameAttributInterface;
|
||||
|
||||
interface NameSourceInterface extends DataSourceInterface, NameAttributInterface
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@@ -19,6 +19,7 @@ final class NicknameSource extends AbstractNameSource implements NicknameSourceI
|
||||
* @todo Implement an extra assert Layer!
|
||||
* @ORM\Column(type="string",length=255)
|
||||
* @Assert\NotBlank()
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $name;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Data\Name;
|
||||
|
||||
interface SurnameSourceInterface extends NameSourceInterface
|
||||
{
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user