Refactored Collection Sources

This commit is contained in:
Kevin Frantz
2018-11-01 19:59:36 +01:00
parent 7cb6238f92
commit 5f18245b73
15 changed files with 148 additions and 63 deletions

View File

@@ -0,0 +1,33 @@
<?php
namespace App\Entity\Attribut;
use Doctrine\Common\Collections\Collection;
use App\Entity\Source\GroupSourceInterface;
/**
* @author kevinfrantz
*/
trait GroupSourcesAttribut
{
/**
* @var Collection|GroupSourceInterface[]
*/
protected $groups;
/**
* @return Collection|GroupSourceInterface[]
*/
public function getGroupSources(): Collection
{
return $this->groups;
}
/**
* @param Collection|GroupSourceInterface[] $groups
*/
public function setGroupSources(Collection $groups): void
{
$this->groups = $groups;
}
}

View File

@@ -0,0 +1,22 @@
<?php
namespace App\Entity\Attribut;
use Doctrine\Common\Collections\Collection;
use App\Entity\Source\GroupSourceInterface;
/**
* @author kevinfrantz
*/
interface GroupSourcesAttributInterface
{
/**
* @param Collection|GroupSourceInterface[] $groups
*/
public function setGroupSources(Collection $groups): void;
/**
* @return Collection|GroupSourceInterface[]
*/
public function getGroupSources(): Collection;
}

View File

@@ -0,0 +1,23 @@
<?php
namespace App\Entity\Attribut;
use Doctrine\Common\Collections\Collection;
use App\Entity\Source\SourceInterface;
trait SourceCollectionAttribut
{
/**
* @param Collection|SourceInterface[] $collection
*/
public function setCollection(Collection $collection):void{
}
/**
* @return Collection|SourceInterface[]
*/
public function getCollection():Collection{
}
}

View File

@@ -0,0 +1,18 @@
<?php
namespace App\Entity\Attribut;
use Doctrine\Common\Collections\Collection;
use App\Entity\Source\SourceInterface;
interface SourceCollectionAttributInterface
{
/**
* @param Collection|SourceInterface[] $collection
*/
public function setCollection(Collection $collection):void;
/**
* @return Collection|SourceInterface[]
*/
public function getCollection():Collection;
}