mtas-tv-backend/src/App/Handler/TeamHandlerFactory.php

23 lines
502 B
PHP
Raw Normal View History

2018-04-06 23:00:37 +02:00
<?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);
}
}