Archived
1
0
Fork 0
This repository has been archived on 2023-09-27. You can view files and clone it, but cannot push or open issues or pull requests.
ts3web/src/Control/Actions/AbstractAction.php

65 lines
1.3 KiB
PHP
Raw Normal View History

2018-04-03 11:56:20 +00:00
<?php
use JeremyKendall\Slim\Auth\Authenticator;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface;
use Slim\Flash\Messages;
use Slim\Http\Request;
use Slim\Http\Response;
use Slim\Views\Twig;
use Symfony\Component\Translation\Translator;
abstract class AbstractAction
{
/**
* @var Twig
*/
protected $view;
/**
* @var LoggerInterface
*/
protected $logger;
/**
* @var Messages
*/
protected $flash;
/**
* @var Authenticator
*/
protected $auth;
/**
* @var ACL
*/
protected $acl;
/**
* @var Translator
*/
protected $translator;
/**
* @var TSInstance
*/
protected $ts;
/**
* AbstractAction constructor.
* @param ContainerInterface $container
*/
public function __construct(ContainerInterface $container)
{
$this->view = $container->get('view');
$this->logger = $container->get('logger');
$this->flash = $container->get('flash');
$this->auth = $container->get('authenticator');
$this->acl = $container->get('acl');
$this->translator = $container->get('translator');
$this->ts = $container->get('ts');
}
public abstract function __invoke(Request $request, Response $response, $args);
}