This repository has been archived by the owner on Sep 18, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
AppKernel.php
68 lines (55 loc) 路 1.63 KB
/
AppKernel.php
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
declare(strict_types=1);
/*
* (c) Christian Gripp <mail@core23.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Core23\SitemapBundle\Tests\App;
use Core23\SitemapBundle\Core23SitemapBundle;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Routing\RouteCollectionBuilder;
final class AppKernel extends Kernel
{
use MicroKernelTrait;
public function __construct()
{
parent::__construct('test', false);
}
public function registerBundles()
{
return [
new FrameworkBundle(),
new Core23SitemapBundle(),
];
}
public function getCacheDir(): string
{
return $this->getBaseDir().'cache';
}
public function getLogDir(): string
{
return $this->getBaseDir().'log';
}
public function getProjectDir(): string
{
return __DIR__;
}
protected function configureRoutes(RouteCollectionBuilder $routes): void
{
$routes->import(__DIR__.'/../../src/Resources/config/routing/sitemap.yml');
}
protected function configureContainer(ContainerBuilder $containerBuilder, LoaderInterface $loader): void
{
$loader->load(__DIR__.'/config/config.yaml');
}
private function getBaseDir(): string
{
return sys_get_temp_dir().'/app-bundle/var/';
}
}