2018-10-27 14:56:26 +02:00
|
|
|
<?php
|
|
|
|
|
2019-02-17 14:33:19 +01:00
|
|
|
namespace Infinito\Attribut;
|
2018-10-27 14:56:26 +02:00
|
|
|
|
2019-02-17 14:33:19 +01:00
|
|
|
use Infinito\Entity\Meta\Relation\RelationInterface;
|
2018-10-27 14:56:26 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @author kevinfrantz
|
2019-03-29 17:53:06 +01:00
|
|
|
*
|
|
|
|
* @see RelationAttributInterface
|
2018-10-27 14:56:26 +02:00
|
|
|
*/
|
|
|
|
trait RelationAttribut
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var RelationInterface
|
|
|
|
*/
|
|
|
|
protected $relation;
|
|
|
|
|
2019-03-29 17:53:06 +01:00
|
|
|
/**
|
|
|
|
* @param RelationInterface $relation
|
|
|
|
*
|
|
|
|
* @see RelationAttributInterface
|
|
|
|
*/
|
2018-10-27 14:56:26 +02:00
|
|
|
public function setRelation(RelationInterface $relation): void
|
|
|
|
{
|
|
|
|
$this->relation = $relation;
|
|
|
|
}
|
|
|
|
|
2019-03-29 17:53:06 +01:00
|
|
|
/**
|
|
|
|
* @see RelationAttributInterface
|
|
|
|
*
|
|
|
|
* @return RelationInterface
|
|
|
|
*/
|
2018-10-27 14:56:26 +02:00
|
|
|
public function getRelation(): RelationInterface
|
|
|
|
{
|
|
|
|
return $this->relation;
|
|
|
|
}
|
|
|
|
}
|