mtas-tv-backend/src/App/Handler/TeamHandlerFactory.php
2018-04-06 23:00:37 +02:00

23 lines
502 B
PHP

<?php
declare(strict_types=1);
namespace App\Handler;
use App\Service\TeamService;
use Psr\Container\ContainerInterface;
use Psr\Http\Server\RequestHandlerInterface;
class TeamHandlerFactory
{
/**
* @param ContainerInterface $container
* @return RequestHandlerInterface
*/
public function __invoke(ContainerInterface $container) : RequestHandlerInterface
{
$teamService = $container->get(TeamService::class);
return new TeamHandler($teamService);
}
}