Implemented AbstractRequestedRightFacade

This commit is contained in:
Kevin Frantz
2019-01-20 12:54:39 +01:00
parent cc491f5707
commit b2d50e3cfd
6 changed files with 213 additions and 79 deletions

View File

@@ -6,30 +6,25 @@ use App\Entity\Source\SourceInterface;
use App\Domain\UserManagement\UserSourceDirectorInterface;
use App\Exception\SetNotPossibleException;
use App\Domain\RequestManagement\Right\RequestedRightInterface;
use App\Domain\RequestManagement\Entity\RequestedEntityInterface;
use App\Domain\RequestManagement\Right\AbstractRequestedRightFacade;
/**
* @author kevinfrantz
*/
class RequestedUser implements RequestedUserInterface
class RequestedUser extends AbstractRequestedRightFacade implements RequestedUserInterface
{
/**
* @var UserSourceDirectorInterface
*/
private $userSourceDirector;
/**
* @var RequestedRightInterface
*/
private $requestedRight;
/**
* @param UserSourceDirectorInterface $userSourceDirector
*/
public function __construct(UserSourceDirectorInterface $userSourceDirector, RequestedRightInterface $requestedRight)
{
$this->userSourceDirector = $userSourceDirector;
$this->requestedRight = $requestedRight;
parent::__construct($requestedRight);
}
/**
@@ -51,62 +46,4 @@ class RequestedUser implements RequestedUserInterface
{
return $this->userSourceDirector->getUser()->getSource();
}
/**
* {@inheritdoc}
*
* @see \App\Attribut\LayerAttributInterface::setLayer()
*/
public function setLayer(string $layer): void
{
$this->requestedRight->setLayer($layer);
}
/**
* {@inheritdoc}
*
* @see \App\Attribut\CrudAttributInterface::getCrud()
*/
public function getCrud(): string
{
return $this->requestedRight->getCrud();
}
/**
* {@inheritdoc}
*
* @see \App\Attribut\LayerAttributInterface::getLayer()
*/
public function getLayer(): string
{
return $this->requestedRight->getLayer();
}
/**
* {@inheritdoc}
*
* @see \App\Attribut\SourceAttributInterface::getSource()
*/
public function getSource(): SourceInterface
{
return $this->requestedRight->getSource();
}
/**
* {@inheritdoc}
*
* @see \App\Attribut\CrudAttributInterface::setCrud()
*/
public function setCrud(string $type): void
{
$this->requestedRight->setCrud($type);
}
/**
* @param RequestedEntityInterface $requestedSource
*/
public function setRequestedEntity(RequestedEntityInterface $requestedSource): void
{
$this->requestedRight->setRequestedEntity($requestedSource);
}
}