mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-14 06:07:18 +02:00
Changed data to primitive folder
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Primitive;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use App\Entity\Source\AbstractSource;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*
|
||||
* @ORM\Entity
|
||||
* @ORM\Table(name="source_data")
|
||||
* @ORM\InheritanceType("JOINED")
|
||||
* @ORM\DiscriminatorColumn(name="discr", type="string")
|
||||
* @ORM\DiscriminatorMap({"name" = "App\Entity\Source\Primitive\Name\AbstractNameSource"})
|
||||
*/
|
||||
abstract class AbstractDataSource extends AbstractSource implements DataSourceInterface
|
||||
{
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Primitive;
|
||||
|
||||
use App\Entity\Source\SourceInterface;
|
||||
|
||||
interface DataSourceInterface extends SourceInterface
|
||||
{
|
||||
}
|
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Primitive\Name;
|
||||
|
||||
use App\Entity\Source\Primitive\AbstractDataSource;
|
||||
use App\Entity\Attribut\NameAttribut;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*
|
||||
* @todo Change to SINGLE_TABLE. JOINED was necessary because SINGLE_TABLE leaded to:
|
||||
*
|
||||
* @see << SQLSTATE[42S02]: Base table or view not found: 1146 Table 'DEV_DATABASE.source_data_name' doesn't exist >>
|
||||
* @ORM\Entity
|
||||
* @ORM\Table(name="source_data_name")
|
||||
* @ORM\InheritanceType("JOINED")
|
||||
* @ORM\DiscriminatorColumn(name="discr", type="string")
|
||||
* @ORM\DiscriminatorMap({"nickname" = "NicknameSource","firstname" = "FirstNameSource", "surname" = "SurnameSource"})
|
||||
*/
|
||||
class AbstractNameSource extends AbstractDataSource implements NameSourceInterface
|
||||
{
|
||||
use NameAttribut;
|
||||
|
||||
/**
|
||||
* @todo Implement an extra assert Layer! - maybe ;)
|
||||
* @ORM\Column(type="string",length=255)
|
||||
* @Assert\NotBlank()
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $name;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Primitive\Name;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
* @ORM\Entity()
|
||||
*/
|
||||
class FirstNameSource extends AbstractNameSource implements FirstNameSourceInterface
|
||||
{
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Primitive\Name;
|
||||
|
||||
interface FirstNameSourceInterface extends NameSourceInterface
|
||||
{
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Primitive\Name;
|
||||
|
||||
use App\Entity\Source\Primitive\DataSourceInterface;
|
||||
use App\Entity\Attribut\NameAttributInterface;
|
||||
|
||||
interface NameSourceInterface extends DataSourceInterface, NameAttributInterface
|
||||
{
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Primitive\Name;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
* @ORM\Entity()
|
||||
*/
|
||||
class NicknameSource extends AbstractNameSource implements NicknameSourceInterface
|
||||
{
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Primitive\Name;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
interface NicknameSourceInterface extends NameSourceInterface
|
||||
{
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Primitive\Name;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
* @ORM\Entity()
|
||||
*/
|
||||
class SurnameSource extends AbstractNameSource implements SurnameSourceInterface
|
||||
{
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Primitive\Name;
|
||||
|
||||
interface SurnameSourceInterface extends NameSourceInterface
|
||||
{
|
||||
}
|
Reference in New Issue
Block a user