mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Optimized RequestManagement
This commit is contained in:
@@ -6,7 +6,8 @@ use App\Attribut\ActionTypeAttribut;
|
||||
use App\DBAL\Types\ActionType;
|
||||
use App\DBAL\Types\Meta\Right\CRUDType;
|
||||
use App\Domain\RequestManagement\User\RequestedUser;
|
||||
use App\Domain\RequestManagement\Right\RequestedRightInterface;
|
||||
use App\Domain\RequestManagement\User\RequestedUserInterface;
|
||||
use App\Domain\UserManagement\UserSourceDirectorInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
@@ -27,11 +28,13 @@ class RequestedAction extends RequestedUser implements RequestedActionInterface
|
||||
];
|
||||
|
||||
/**
|
||||
* @param RequestedRightInterface $requestedRight
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \App\Domain\RequestManagement\User\RequestedUser::__construct()
|
||||
*/
|
||||
public function __construct(RequestedRightInterface $requestedRight)
|
||||
public function __construct(UserSourceDirectorInterface $userSourceDirector, RequestedUserInterface $requestedUser)
|
||||
{
|
||||
$this->requestedRight = $requestedRight;
|
||||
parent::__construct($userSourceDirector, $requestedUser);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -2,7 +2,8 @@
|
||||
|
||||
namespace App\Domain\RequestManagement\Action;
|
||||
|
||||
use App\Domain\RequestManagement\Right\RequestedRightServiceInterface;
|
||||
use App\Domain\RequestManagement\User\RequestedUserServiceInterface;
|
||||
use App\Domain\UserManagement\UserSourceDirectorInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
@@ -10,10 +11,11 @@ use App\Domain\RequestManagement\Right\RequestedRightServiceInterface;
|
||||
final class RequestedActionService extends RequestedAction implements RequestedActionServiceInterface
|
||||
{
|
||||
/**
|
||||
* @param RequestedRightServiceInterface $requestedRightService
|
||||
* @param UserSourceDirectorInterface $userSourceDirector
|
||||
* @param RequestedUserServiceInterface $requestedUserService
|
||||
*/
|
||||
public function __construct(RequestedRightServiceInterface $requestedRightService)
|
||||
public function __construct(UserSourceDirectorInterface $userSourceDirector, RequestedUserServiceInterface $requestedUserService)
|
||||
{
|
||||
parent::__construct($requestedRightService);
|
||||
parent::__construct($userSourceDirector, $requestedUserService);
|
||||
}
|
||||
}
|
||||
|
@@ -9,6 +9,6 @@ namespace App\Domain\RequestManagement\Action;
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
interface RequestedActionServiceInterface
|
||||
interface RequestedActionServiceInterface extends RequestedActionInterface
|
||||
{
|
||||
}
|
||||
|
@@ -3,10 +3,13 @@ The request management works with different layers.
|
||||
|
||||
### Layers
|
||||
Each layer contains out of __2 classes__ and __2 interfaces__ for it.
|
||||
One class contains the __logic__ and the other class contains the __service__. This makes the classes easier testable and mockable and follows the [SOLID Design Principles](https://en.wikipedia.org/wiki/SOLID). The layer order you can keep in mind with the acronym __RUAE__: __R__ight__U__ser__A__ction__E__ntity.
|
||||
One class contains the __logic__ and the other class contains the __service__. This makes the classes easier testable and mockable and follows the [SOLID Design Principles](https://en.wikipedia.org/wiki/SOLID).
|
||||
|
||||
#### Right
|
||||
This is the basic request layer from which the other layers inhiere.
|
||||
#### User
|
||||
#### Action
|
||||
#### Entity
|
||||
A **requested entity** contains the attributes to manage the entity which should be handled by an action
|
||||
#### Right
|
||||
This is the basic request layer from which the other layers inhiere. The relation from a **requested right** to a **requested entity** is 1:0,1
|
||||
#### User
|
||||
A **requested user** contains is a parent of **requested action**.
|
||||
#### Action
|
||||
A **requested action** contains inhieres from **requested user**.
|
||||
|
@@ -7,6 +7,6 @@ namespace App\Domain\RequestManagement\Right;
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
final class RequestedRightService extends RequestedRight
|
||||
final class RequestedRightService extends RequestedRight implements RequestedRightServiceInterface
|
||||
{
|
||||
}
|
||||
|
Reference in New Issue
Block a user