mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Renamed domain ActionManagement to Action
This commit is contained in:
Binary file not shown.
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 191 KiB |
57
application/symfony/src/Domain/Action/AbstractAction.php
Normal file
57
application/symfony/src/Domain/Action/AbstractAction.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace Infinito\Domain\Action;
|
||||
|
||||
use Infinito\Entity\EntityInterface;
|
||||
use Infinito\Exception\Validation\FormInvalidException;
|
||||
use Infinito\Exception\Permission\NoPermissionException;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
abstract class AbstractAction extends AbstractActionConstructor implements ActionInterface
|
||||
{
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
abstract protected function isSecure(): bool;
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
abstract protected function isValid(): bool;
|
||||
|
||||
/**
|
||||
* Process the routine.
|
||||
*
|
||||
* @return EntityInterface|EntityInterface[]|null
|
||||
*/
|
||||
abstract protected function proccess();
|
||||
|
||||
/**
|
||||
* This function can be implemented in the child classes for preparation.
|
||||
*/
|
||||
protected function prepare(): void
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \Exception
|
||||
*
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Action\ActionInterface::execute()
|
||||
*/
|
||||
final public function execute(): ?EntityInterface
|
||||
{
|
||||
$this->prepare();
|
||||
if ($this->isSecure()) {
|
||||
if ($this->isValid()) {
|
||||
return $this->proccess();
|
||||
}
|
||||
throw new FormInvalidException('The requested Entity is not valid!');
|
||||
}
|
||||
throw new NoPermissionException("You don't have the permission to execute this action!");
|
||||
}
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Infinito\Domain\Action;
|
||||
|
||||
/**
|
||||
* This class just containes the constructor
|
||||
* It is used by concrete actions and the factory.
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
abstract class AbstractActionConstructor
|
||||
{
|
||||
/**
|
||||
* @var ActionDependenciesDAOServiceInterface
|
||||
*/
|
||||
protected $actionService;
|
||||
|
||||
/**
|
||||
* @param ActionDependenciesDAOServiceInterface $actionService
|
||||
*/
|
||||
final public function __construct(ActionDependenciesDAOServiceInterface $actionService)
|
||||
{
|
||||
$this->actionService = $actionService;
|
||||
}
|
||||
}
|
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
|
||||
namespace Infinito\Domain\Action;
|
||||
|
||||
use Infinito\Domain\RequestManagement\Action\RequestedActionInterface;
|
||||
use Infinito\Domain\RepositoryManagement\LayerRepositoryFactoryServiceInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
use Infinito\Repository\RepositoryInterface;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Infinito\Domain\FormManagement\RequestedActionFormBuilderServiceInterface;
|
||||
use Infinito\Domain\RequestManagement\Action\RequestedActionServiceInterface;
|
||||
use Infinito\Domain\SecureManagement\SecureRequestedRightCheckerServiceInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
final class ActionDependenciesDAOService implements ActionDependenciesDAOServiceInterface
|
||||
{
|
||||
/**
|
||||
* @var RequestStack
|
||||
*/
|
||||
private $requestStack;
|
||||
|
||||
/**
|
||||
* @var RequestedActionInterface
|
||||
*/
|
||||
private $requestedAction;
|
||||
|
||||
/**
|
||||
* @var SecureRequestedRightCheckerServiceInterface
|
||||
*/
|
||||
private $secureRequestedRightCheckerService;
|
||||
|
||||
/**
|
||||
* @var LayerRepositoryFactoryServiceInterface
|
||||
*/
|
||||
private $layerRepositoryFactoryService;
|
||||
|
||||
/**
|
||||
* @var RequestedActionFormBuilderServiceInterface
|
||||
*/
|
||||
private $requestedActionFormBuilderService;
|
||||
|
||||
/**
|
||||
* @var EntityManagerInterface
|
||||
*/
|
||||
private $entityManager;
|
||||
|
||||
/**
|
||||
* @param RequestedActionInterface $requestedActionService
|
||||
*/
|
||||
public function __construct(RequestedActionServiceInterface $requestedActionService, SecureRequestedRightCheckerServiceInterface $secureRequestedRightChecker, RequestStack $requestStack, LayerRepositoryFactoryServiceInterface $layerRepositoryFactoryService, RequestedActionFormBuilderServiceInterface $requestedActionFormBuilderService, EntityManagerInterface $entityManager)
|
||||
{
|
||||
$this->requestedAction = $requestedActionService;
|
||||
$this->secureRequestedRightCheckerService = $secureRequestedRightChecker;
|
||||
$this->requestStack = $requestStack;
|
||||
$this->layerRepositoryFactoryService = $layerRepositoryFactoryService;
|
||||
$this->requestedActionFormBuilderService = $requestedActionFormBuilderService;
|
||||
$this->entityManager = $entityManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Action\ActionDependenciesDAOServiceInterface::getRequestedAction()
|
||||
*/
|
||||
public function getRequestedAction(): RequestedActionInterface
|
||||
{
|
||||
return $this->requestedAction;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Action\ActionDependenciesDAOServiceInterface::isRequestedActionSecure()
|
||||
*/
|
||||
public function isRequestedActionSecure(): bool
|
||||
{
|
||||
return $this->secureRequestedRightCheckerService->check($this->requestedAction);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return FormBuilderInterface
|
||||
*/
|
||||
public function getCurrentFormBuilder(): FormBuilderInterface
|
||||
{
|
||||
return $this->requestedActionFormBuilderService->createByService();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Action\ActionDependenciesDAOServiceInterface::getRequest()
|
||||
*/
|
||||
public function getRequest(): Request
|
||||
{
|
||||
return $this->requestStack->getCurrentRequest();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Action\ActionDependenciesDAOServiceInterface::getRepository()
|
||||
*/
|
||||
public function getRepository(): RepositoryInterface
|
||||
{
|
||||
$layer = $this->requestedAction->getLayer();
|
||||
|
||||
return $this->layerRepositoryFactoryService->getRepository($layer);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Action\ActionDependenciesDAOServiceInterface::getEntityManager()
|
||||
*/
|
||||
public function getEntityManager(): EntityManagerInterface
|
||||
{
|
||||
return $this->entityManager;
|
||||
}
|
||||
}
|
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace Infinito\Domain\Action;
|
||||
|
||||
use Infinito\Domain\RequestManagement\Action\RequestedActionInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Infinito\Repository\RepositoryInterface;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
/**
|
||||
* This interface offers all classes for managing an Action.
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
interface ActionDependenciesDAOServiceInterface
|
||||
{
|
||||
/**
|
||||
* @return RequestedActionInterface Returns the requested action
|
||||
*/
|
||||
public function getRequestedAction(): RequestedActionInterface;
|
||||
|
||||
/**
|
||||
* @return bool true if the action permissions are right
|
||||
*/
|
||||
public function isRequestedActionSecure(): bool;
|
||||
|
||||
/**
|
||||
* @return Request
|
||||
*/
|
||||
public function getRequest(): Request;
|
||||
|
||||
/**
|
||||
* @return RepositoryInterface
|
||||
*/
|
||||
public function getRepository(): RepositoryInterface;
|
||||
|
||||
/**
|
||||
* @return FormBuilderInterface
|
||||
*/
|
||||
public function getCurrentFormBuilder(): FormBuilderInterface;
|
||||
|
||||
/**
|
||||
* @return EntityManagerInterface
|
||||
*/
|
||||
public function getEntityManager(): EntityManagerInterface;
|
||||
}
|
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
|
||||
namespace Infinito\Domain\Action;
|
||||
|
||||
use Infinito\Exception\NoDefaultClassException;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
final class ActionFactoryService extends AbstractActionConstructor implements ActionFactoryServiceInterface
|
||||
{
|
||||
/**
|
||||
* @var string Namespace in which the actions will be found
|
||||
*/
|
||||
private const BASE_NAMESPACE = 'Infinito\\Domain\\Action\\';
|
||||
|
||||
/**
|
||||
* @var string Suffix for action classes
|
||||
*/
|
||||
private const CLASS_SUFFIX = 'Action';
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function ucfirst(string $name): string
|
||||
{
|
||||
return ucfirst(strtolower($name));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $action
|
||||
* @param string $layer
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function getClassName(string $action, string $layer = ''): string
|
||||
{
|
||||
return $this->ucfirst($action).$this->ucfirst($layer).self::CLASS_SUFFIX;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $layer
|
||||
* @param string $action
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function getActionNamespace(string $action, string $layer = ''): string
|
||||
{
|
||||
return self::BASE_NAMESPACE.$this->ucfirst($action).'\\'.$this->getClassName($action, $layer);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
private function generateFullClassName(): string
|
||||
{
|
||||
$requestedAction = $this->actionService->getRequestedAction();
|
||||
$action = $requestedAction->getActionType();
|
||||
$layer = $requestedAction->getLayer();
|
||||
$class = $this->getActionNamespace($action, $layer);
|
||||
if (class_exists($class)) {
|
||||
return $class;
|
||||
}
|
||||
$defaultClass = $this->getActionNamespace($action);
|
||||
if (class_exists($defaultClass)) {
|
||||
return $defaultClass;
|
||||
}
|
||||
throw new NoDefaultClassException("There is no default substitution class for $class with attributes {layer:\"$layer\",action:\"$action\"}");
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Action\ActionFactoryServiceInterface::create()
|
||||
*/
|
||||
public function create(): ActionInterface
|
||||
{
|
||||
$class = $this->generateFullClassName();
|
||||
|
||||
return new $class($this->actionService);
|
||||
}
|
||||
}
|
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Infinito\Domain\Action;
|
||||
|
||||
/**
|
||||
* Offers a function to create an action object by the RequestedActionService.
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
interface ActionFactoryServiceInterface
|
||||
{
|
||||
/**
|
||||
* @return ActionInterface
|
||||
*/
|
||||
public function create(): ActionInterface;
|
||||
}
|
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Infinito\Domain\Action;
|
||||
|
||||
use Infinito\Entity\EntityInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
final class ActionHandlerService implements ActionHandlerServiceInterface
|
||||
{
|
||||
/**
|
||||
* @var ActionFactoryServiceInterface
|
||||
*/
|
||||
private $actionFactoryService;
|
||||
|
||||
/**
|
||||
* @param ActionFactoryServiceInterface $actionFactoryService
|
||||
*/
|
||||
public function __construct(ActionFactoryServiceInterface $actionFactoryService)
|
||||
{
|
||||
$this->actionFactoryService = $actionFactoryService;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Action\ActionHandlerServiceInterface::handle()
|
||||
*/
|
||||
public function handle(): ?EntityInterface
|
||||
{
|
||||
return $this->actionFactoryService->create()->execute();
|
||||
}
|
||||
}
|
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace Infinito\Domain\Action;
|
||||
|
||||
use Infinito\Entity\EntityInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
interface ActionHandlerServiceInterface
|
||||
{
|
||||
/**
|
||||
* Process an action an returns the results.
|
||||
*
|
||||
* @todo Implement that also results can be returned
|
||||
*
|
||||
* @return EntityInterface|null
|
||||
*/
|
||||
public function handle(): ?EntityInterface;
|
||||
}
|
20
application/symfony/src/Domain/Action/ActionInterface.php
Normal file
20
application/symfony/src/Domain/Action/ActionInterface.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace Infinito\Domain\Action;
|
||||
|
||||
use Infinito\Entity\EntityInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
interface ActionInterface
|
||||
{
|
||||
/**
|
||||
* Executes the action.
|
||||
*
|
||||
* @todo Implement that also results can be returned
|
||||
*
|
||||
* @return EntityInterface|null
|
||||
*/
|
||||
public function execute(): ?EntityInterface;
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Infinito\Domain\Action\Create;
|
||||
|
||||
use Infinito\Domain\Action\AbstractAction;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
abstract class AbstractCreateAction extends AbstractAction implements CreateActionInterface
|
||||
{
|
||||
/**
|
||||
* In general everybody should be allowed to create everything!
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Action\AbstractAction::isSecure()
|
||||
*/
|
||||
protected function isSecure(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Infinito\Domain\Action\Create;
|
||||
|
||||
use Infinito\Domain\Action\ActionInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
interface CreateActionInterface extends ActionInterface
|
||||
{
|
||||
}
|
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
namespace Infinito\Domain\Action\Create;
|
||||
|
||||
use Infinito\Domain\SourceManagement\SourceClassInformationService;
|
||||
use Infinito\Entity\Source\AbstractSource;
|
||||
use Symfony\Component\Form\Form;
|
||||
use Infinito\Domain\ParameterManagement\Parameter\ClassParameter;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
final class CreateSourceAction extends AbstractCreateAction
|
||||
{
|
||||
/**
|
||||
* @var string default class name, when no parameter is defined
|
||||
*/
|
||||
private const DEFAULT_CLASS = AbstractSource::class;
|
||||
|
||||
/**
|
||||
* @see SourceClassInformationService
|
||||
*
|
||||
* @var string The source class which should be used
|
||||
*/
|
||||
private $sourceClass;
|
||||
|
||||
/**
|
||||
* @var Form
|
||||
*/
|
||||
private $form;
|
||||
|
||||
private function setSourceClass(): void
|
||||
{
|
||||
$request = $this->actionService->getRequest();
|
||||
$this->sourceClass = $request->get(ClassParameter::getKey(), self::DEFAULT_CLASS);
|
||||
}
|
||||
|
||||
private function setForm(): void
|
||||
{
|
||||
$this->form = $this->actionService->getCurrentFormBuilder()->getForm();
|
||||
}
|
||||
|
||||
private function setRequestedEntityClass(): void
|
||||
{
|
||||
$this->actionService->getRequestedAction()->getRequestedEntity()->setClass($this->sourceClass);
|
||||
}
|
||||
|
||||
private function handleRequest(): void
|
||||
{
|
||||
$this->form->handleRequest($this->actionService->getRequest());
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Action\AbstractAction::prepare()
|
||||
*/
|
||||
protected function prepare(): void
|
||||
{
|
||||
$this->setSourceClass();
|
||||
$this->setRequestedEntityClass();
|
||||
$this->setForm();
|
||||
$this->handleRequest();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Action\AbstractAction::isValid()
|
||||
*/
|
||||
protected function isValid(): bool
|
||||
{
|
||||
//The following Exception just exists out of debuging reasons during the development process
|
||||
if (!$this->form->isSubmitted()) {
|
||||
throw new \Exception('The form is not submitted!');
|
||||
}
|
||||
|
||||
return $this->form->isValid();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Action\AbstractAction::proccess()
|
||||
*/
|
||||
protected function proccess()
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace Infinito\Domain\Action\Delete;
|
||||
|
||||
use Infinito\Domain\Action\AbstractAction;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
* Declare as not final as soon as you need it!
|
||||
*/
|
||||
final class DeleteAction extends AbstractAction
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Action\AbstractAction::isSecure()
|
||||
*/
|
||||
protected function isSecure(): bool
|
||||
{
|
||||
return $this->isSecure();
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo Implement!
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Action\AbstractAction::isValid()
|
||||
*/
|
||||
protected function isValid(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Action\AbstractAction::proccess()
|
||||
*/
|
||||
protected function proccess()
|
||||
{
|
||||
$entityManager = $this->actionService->getEntityManager();
|
||||
$entity = $this->actionService->getRequestedAction()->getRequestedEntity()->getEntity();
|
||||
$entityManager->remove($entity);
|
||||
}
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Infinito\Domain\Action\Execute;
|
||||
|
||||
use Infinito\Domain\Action\AbstractAction;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
abstract class AbstractExecuteAction extends AbstractAction
|
||||
{
|
||||
}
|
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Infinito\Domain\Action\Execute;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
final class ExecuteAction extends AbstractExecuteAction
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Action\AbstractAction::isSecure()
|
||||
*/
|
||||
protected function isSecure(): bool
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Action\AbstractAction::isValid()
|
||||
*/
|
||||
protected function isValid(): bool
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Action\AbstractAction::proccess()
|
||||
*/
|
||||
protected function proccess()
|
||||
{
|
||||
}
|
||||
}
|
3
application/symfony/src/Domain/Action/README.md
Normal file
3
application/symfony/src/Domain/Action/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Action
|
||||
## Brainstorming
|
||||

|
42
application/symfony/src/Domain/Action/Read/ReadAction.php
Normal file
42
application/symfony/src/Domain/Action/Read/ReadAction.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace Infinito\Domain\Action\Read;
|
||||
|
||||
use Infinito\Domain\Action\AbstractAction;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
final class ReadAction extends AbstractAction implements ReadActionInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Action\AbstractAction::isSecure()
|
||||
*/
|
||||
protected function isSecure(): bool
|
||||
{
|
||||
return $this->actionService->isRequestedActionSecure();
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo Implement!
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Action\AbstractAction::isValid()
|
||||
*/
|
||||
protected function isValid(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Action\AbstractAction::proccess()
|
||||
*/
|
||||
protected function proccess()
|
||||
{
|
||||
return $this->actionService->getRequestedAction()->getRequestedEntity()->getEntity();
|
||||
}
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Infinito\Domain\Action\Read;
|
||||
|
||||
use Infinito\Domain\Action\ActionInterface;
|
||||
|
||||
/**
|
||||
* Needed for mocking with PHPUnit!
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
interface ReadActionInterface extends ActionInterface
|
||||
{
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Infinito\Domain\Action\Update;
|
||||
|
||||
use Infinito\Domain\Action\AbstractAction;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
abstract class AbstractUpdateAction extends AbstractAction
|
||||
{
|
||||
}
|
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Infinito\Domain\Action\Update;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
final class UpdateSourceAction extends AbstractUpdateAction
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Action\AbstractAction::isSecure()
|
||||
*/
|
||||
protected function isSecure(): bool
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Action\AbstractAction::isValid()
|
||||
*/
|
||||
protected function isValid(): bool
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\Action\AbstractAction::proccess()
|
||||
*/
|
||||
protected function proccess()
|
||||
{
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user