1<?php
2
3/**
4 * vim:set softtabstop=4 shiftwidth=4 expandtab:
5 *
6 * LICENSE: GNU Affero General Public License, version 3 (AGPL-3.0-or-later)
7 * Copyright 2001 - 2020 Ampache.org
8 *
9 * This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU Affero General Public License as published by
11 * the Free Software Foundation, either version 3 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU Affero General Public License for more details.
18 *
19 * You should have received a copy of the GNU Affero General Public License
20 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
21 *
22 */
23
24declare(strict_types=1);
25
26use Ampache\Module\Application\ApplicationRunner;
27use Ampache\Module\Application\Channel\CreateAction;
28use Ampache\Module\Application\Channel\DeleteAction;
29use Ampache\Module\Application\Channel\ShowCreateAction;
30use Ampache\Module\Application\Channel\ShowDeleteAction;
31use Nyholm\Psr7Server\ServerRequestCreatorInterface;
32use Psr\Container\ContainerInterface;
33
34/** @var ContainerInterface $dic */
35$dic = require __DIR__ . '/../src/Config/Init.php';
36
37$dic->get(ApplicationRunner::class)->run(
38    $dic->get(ServerRequestCreatorInterface::class)->fromGlobals(),
39    [
40        ShowCreateAction::REQUEST_KEY => ShowCreateAction::class,
41        CreateAction::REQUEST_KEY => CreateAction::class,
42        ShowDeleteAction::REQUEST_KEY => ShowDeleteAction::class,
43        DeleteAction::REQUEST_KEY => DeleteAction::class,
44    ],
45    ShowCreateAction::REQUEST_KEY
46);
47