infinito/application/src/Entity/Source/Complex/FullPersonNameSource.php

45 lines
1.4 KiB
PHP
Raw Normal View History

2018-11-10 13:09:18 +01:00
<?php
2018-11-21 17:55:48 +01:00
namespace App\Entity\Source\Complex;
2018-11-10 13:09:18 +01:00
use App\Entity\Attribut\FirstNameSourceAttribut;
use App\Entity\Attribut\SurnameSourceAttribut;
2018-11-21 17:16:32 +01:00
use App\Entity\Source\Primitive\Name\SurnameSource;
use App\Entity\Source\Primitive\Name\FirstNameSource;
use Doctrine\ORM\Mapping as ORM;
2018-11-21 17:16:32 +01:00
use App\Entity\Source\Primitive\Name\SurnameSourceInterface;
use App\Entity\Source\Primitive\Name\FirstNameSourceInterface;
/**
* @author kevinfrantz
* @ORM\Table(name="source_combination_fullpersonname")
* @ORM\Entity()
*/
class FullPersonNameSource extends AbstractComplexSource implements FullPersonNameSourceInterface
2018-11-10 13:09:18 +01:00
{
use FirstNameSourceAttribut,SurnameSourceAttribut;
2018-11-20 22:04:29 +01:00
/**
2018-11-21 17:16:32 +01:00
* @ORM\OneToOne(targetEntity="App\Entity\Source\Primitive\Name\SurnameSource",cascade={"persist", "remove"})
2018-11-20 22:04:29 +01:00
* @ORM\JoinColumn(name="surname_id", referencedColumnName="id",onDelete="CASCADE")
*
* @var SurnameSourceInterface
*/
protected $surnameSource;
/**
2018-11-21 17:16:32 +01:00
* @ORM\OneToOne(targetEntity="App\Entity\Source\Primitive\Name\FirstNameSource",cascade={"persist", "remove"})
2018-11-20 22:04:29 +01:00
* @ORM\JoinColumn(name="firstname_id", referencedColumnName="id",onDelete="CASCADE")
*
* @var FirstNameSourceInterface
*/
protected $firstNameSource;
2018-11-20 22:04:29 +01:00
public function __construct()
{
parent::__construct();
$this->surnameSource = new SurnameSource();
$this->firstNameSource = new FirstNameSource();
}
2018-11-10 13:09:18 +01:00
}