1 <?php
2
3 /*
4 * This file is part of the Icybee package.
5 *
6 * (c) Olivier Laviale <olivier.laviale@gmail.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Icybee;
13
14 use ICanBoogie\AuthenticationRequired;
15 use ICanBoogie\HTTP\Request;
16
17 class AdminIndexController extends \ICanBoogie\Routing\Controller
18 {
19 public function __invoke(Request $request)
20 {
21 global $core;
22
23 if ($core->user->is_guest)
24 {
25 throw new AuthenticationRequired();
26 }
27
28 return new DocumentDecorator(new AdminDecorator(''));
29 }
30 }