Optimized MVC and implemented function tests for format

This commit is contained in:
Kevin Frantz
2019-03-29 17:53:06 +01:00
parent 522ba1994e
commit 94b84527a8
9 changed files with 92 additions and 10 deletions

View File

@@ -44,8 +44,10 @@ final class MVCRoutineService implements MVCRoutineServiceInterface
*/
public function process(): View
{
$this->processService->process();
$data = $this->processService->process();
$view = $this->viewBuilder->getView();
$view->setData($data);
return $this->viewBuilder->getView();
return $view;
}
}

View File

@@ -70,7 +70,7 @@ final class ProcessService implements ProcessServiceInterface
*
* @see \Infinito\Domain\ProcessManagement\ProcessServiceInterface::process()
*/
public function process(): void
public function process()
{
if ($this->requestedActionService->hasRequestedEntity() && $this->requestedActionService->getRequestedEntity()->hasIdentity()) {
// READ VIEW
@@ -95,5 +95,7 @@ final class ProcessService implements ProcessServiceInterface
->createView();
$this->actionTemplateDataStore->setData(ActionType::CREATE, $updateForm);
}
return $this->actionTemplateDataStore;
}
}

View File

@@ -7,5 +7,8 @@ namespace Infinito\Domain\ProcessManagement;
*/
interface ProcessServiceInterface
{
public function process(): void;
/**
* @todo specify return type
*/
public function process();
}