* kanban service and stuff

This commit is contained in:
Dávid Danyi
2018-04-21 15:23:06 +02:00
parent b0295227bc
commit a43b5e9d09
25 changed files with 2071 additions and 1 deletions

View File

@@ -0,0 +1,40 @@
<?php
declare(strict_types=1);
namespace App\Handler;
use App\Entity\KanbanBoard;
use App\Service\JiraCollectorService;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Zend\Diactoros\Response\JsonResponse;
class KanbanHandler implements RequestHandlerInterface
{
/** @var JiraCollectorService */
private $dataCollector;
/**
* KanbanAction constructor.
* @param JiraCollectorService $dataCollectorService
*/
public function __construct(JiraCollectorService $dataCollectorService)
{
$this->dataCollector = $dataCollectorService;
}
/**
* @param ServerRequestInterface $request
* @return ResponseInterface
* @todo filterId
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
$filterId = $request->getAttribute('filterId');
/** @var KanbanBoard $kanbanResult */
$kanbanResult = $this->dataCollector->getKanbanBoard($filterId);
return new JsonResponse($kanbanResult);
}
}