mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-08 13:51:34 +01:00
Added workflow draft
This commit is contained in:
parent
caa5f9aec4
commit
05e87bdfcc
49
application/src/Controller/workflow/AbstractWorkflow.php
Normal file
49
application/src/Controller/workflow/AbstractWorkflow.php
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
<?php
|
||||||
|
namespace Controller\workflow;
|
||||||
|
|
||||||
|
use App\Controller\workflow\WorkflowInterface;
|
||||||
|
use App\Entity\NodeInterface;
|
||||||
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author kevinfrantz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
abstract class AbstractWorkflow implements WorkflowInterface
|
||||||
|
{
|
||||||
|
protected $type = 'html';
|
||||||
|
|
||||||
|
protected $response;
|
||||||
|
|
||||||
|
protected $request;
|
||||||
|
|
||||||
|
public function __construct(Request $request){}
|
||||||
|
|
||||||
|
abstract protected function handlePost():void;
|
||||||
|
|
||||||
|
abstract protected function handleGet():void;
|
||||||
|
|
||||||
|
private function setType():void{}
|
||||||
|
|
||||||
|
public function work(): void
|
||||||
|
{
|
||||||
|
$this->response = new Response();
|
||||||
|
$this->setType();
|
||||||
|
$this->handlePost();
|
||||||
|
$this->handleGet();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setReguest(Request $request): void
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getReponse(): Response
|
||||||
|
{}
|
||||||
|
|
||||||
|
public function setWorker(NodeInterface $worker): void
|
||||||
|
{}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
20
application/src/Controller/workflow/LoginWorkflow.php
Normal file
20
application/src/Controller/workflow/LoginWorkflow.php
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
namespace Controller\workflow;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author kevinfrantz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class LoginWorkflow extends AbstractWorkflow
|
||||||
|
{
|
||||||
|
protected function handleGet(): void
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function handlePost(): void
|
||||||
|
{}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
20
application/src/Controller/workflow/LogoutWorkflow.php
Normal file
20
application/src/Controller/workflow/LogoutWorkflow.php
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
namespace App\Controller\workflow;
|
||||||
|
|
||||||
|
use Controller\workflow\AbstractWorkflow;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author kevinfrantz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class LogoutWorkflow extends AbstractWorkflow
|
||||||
|
{
|
||||||
|
protected function handleGet(): void
|
||||||
|
{}
|
||||||
|
|
||||||
|
protected function handlePost(): void
|
||||||
|
{}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
23
application/src/Controller/workflow/WorkflowInterface.php
Normal file
23
application/src/Controller/workflow/WorkflowInterface.php
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
namespace App\Controller\workflow;
|
||||||
|
|
||||||
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
use App\Entity\NodeInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author kevinfrantz
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
interface WorkflowInterface
|
||||||
|
{
|
||||||
|
public function setWorker(NodeInterface $worker):void;
|
||||||
|
|
||||||
|
public function setReguest(Request $request):void;
|
||||||
|
|
||||||
|
public function work():void;
|
||||||
|
|
||||||
|
public function getReponse():Response;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user