-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathAppKernel.php
37 lines (31 loc) · 944 Bytes
/
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
<?php
namespace Kjonski\HowToBundle\Tests\App;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\HttpKernel\Kernel;
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = [
\Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
\Kjonski\HowToBundle\KjonskiHowToBundle::class => ['all' => true],
];
foreach ($bundles as $class => $envs) {
if (isset($envs['all']) || isset($envs[$this->environment])) {
yield new $class();
}
}
}
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__.'/config.yml');
}
public function getLogDir()
{
return sys_get_temp_dir().'/logs';
}
public function getCacheDir()
{
return sys_get_temp_dir().'/cache/'.$this->environment;
}
}