summaryrefslogtreecommitdiff
path: root/src/Controllers/CreditsController.php
blob: ade97649c525aefd7397cd60f484f579d6849035 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php

namespace Engelsystem\Controllers;

use Engelsystem\Config\Config;
use Engelsystem\Helpers\Version;
use Engelsystem\Http\Response;

class CreditsController extends BaseController
{
    /** @var Config */
    protected $config;

    /** @var Response */
    protected $response;

    /** @var Version */
    protected $version;

    /**
     * @param Response $response
     * @param Config   $config
     * @param Version  $version
     */
    public function __construct(Response $response, Config $config, Version $version)
    {
        $this->config = $config;
        $this->response = $response;
        $this->version = $version;
    }

    /**
     * @return Response
     */
    public function index()
    {
        return $this->response->withView(
            'pages/credits.twig',
            [
                'credits' => $this->config->get('credits'),
                'version' => $this->version->getVersion(),
            ]
        );
    }
}