* executor basics added to repo
This commit is contained in:
27
src/App/Action/CiExecutorAction.php
Normal file
27
src/App/Action/CiExecutorAction.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Action;
|
||||
|
||||
use App\Response\JsonCorsResponse;
|
||||
use App\Service\CiExecutorService;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
|
||||
class CiExecutorAction extends AbstractAction
|
||||
{
|
||||
|
||||
/**
|
||||
* @var CiExecutorService
|
||||
*/
|
||||
private $ciExecutorService;
|
||||
|
||||
public function __construct(CiExecutorService $ciExecutorService)
|
||||
{
|
||||
$this->ciExecutorService = $ciExecutorService;
|
||||
}
|
||||
|
||||
public function getList(ServerRequestInterface $request, ResponseInterface $response, callable $next = null)
|
||||
{
|
||||
return new JsonCorsResponse($this->ciExecutorService->debug());
|
||||
}
|
||||
}
|
||||
15
src/App/Action/CiExecutorFactory.php
Normal file
15
src/App/Action/CiExecutorFactory.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Action;
|
||||
|
||||
use App\Service\CiExecutorService;
|
||||
use Interop\Container\ContainerInterface;
|
||||
|
||||
class CiExecutorFactory
|
||||
{
|
||||
public function __invoke(ContainerInterface $container)
|
||||
{
|
||||
$service = $container->get(CiExecutorService::class);
|
||||
return new CiExecutorAction($service);
|
||||
}
|
||||
}
|
||||
27
src/App/Action/CiStreamAction.php
Normal file
27
src/App/Action/CiStreamAction.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Action;
|
||||
|
||||
use App\Response\JsonCorsResponse;
|
||||
use App\Service\CiExecutorService;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
|
||||
class CiStreamAction extends AbstractAction
|
||||
{
|
||||
|
||||
/**
|
||||
* @var CiExecutorService
|
||||
*/
|
||||
private $ciExecutorService;
|
||||
|
||||
public function __construct(CiExecutorService $ciExecutorService)
|
||||
{
|
||||
$this->ciExecutorService = $ciExecutorService;
|
||||
}
|
||||
|
||||
public function getList(ServerRequestInterface $request, ResponseInterface $response, callable $next = null)
|
||||
{
|
||||
return new JsonCorsResponse($this->ciExecutorService->getCiStreams());
|
||||
}
|
||||
}
|
||||
15
src/App/Action/CiStreamFactory.php
Normal file
15
src/App/Action/CiStreamFactory.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Action;
|
||||
|
||||
use App\Service\CiExecutorService;
|
||||
use Interop\Container\ContainerInterface;
|
||||
|
||||
class CiStreamFactory
|
||||
{
|
||||
public function __invoke(ContainerInterface $container)
|
||||
{
|
||||
$service = $container->get(CiExecutorService::class);
|
||||
return new CiStreamAction($service);
|
||||
}
|
||||
}
|
||||
27
src/App/Action/JcatPackageAction.php
Normal file
27
src/App/Action/JcatPackageAction.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Action;
|
||||
|
||||
use App\Response\JsonCorsResponse;
|
||||
use App\Service\CiExecutorService;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
|
||||
class JcatPackageAction extends AbstractAction
|
||||
{
|
||||
|
||||
/**
|
||||
* @var CiExecutorService
|
||||
*/
|
||||
private $ciExecutorService;
|
||||
|
||||
public function __construct(CiExecutorService $ciExecutorService)
|
||||
{
|
||||
$this->ciExecutorService = $ciExecutorService;
|
||||
}
|
||||
|
||||
public function getList(ServerRequestInterface $request, ResponseInterface $response, callable $next = null)
|
||||
{
|
||||
return new JsonCorsResponse($this->ciExecutorService->getJcatPackages());
|
||||
}
|
||||
}
|
||||
15
src/App/Action/JcatPackageFactory.php
Normal file
15
src/App/Action/JcatPackageFactory.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Action;
|
||||
|
||||
use App\Service\CiExecutorService;
|
||||
use Interop\Container\ContainerInterface;
|
||||
|
||||
class JcatPackageFactory
|
||||
{
|
||||
public function __invoke(ContainerInterface $container)
|
||||
{
|
||||
$service = $container->get(CiExecutorService::class);
|
||||
return new JcatPackageAction($service);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user