|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* |
|
4
|
|
|
* This file is part of the FOSHttpCacheBundle package. |
|
5
|
|
|
* |
|
6
|
|
|
* (c) FriendsOfSymfony <http://friendsofsymfony.github.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
|
|
|
use Symfony\Component\Config\Loader\LoaderInterface; |
|
13
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
|
14
|
|
|
use Symfony\Component\HttpKernel\Kernel; |
|
15
|
|
|
|
|
16
|
|
|
class AppKernel extends Kernel |
|
17
|
|
|
{ |
|
18
|
|
|
/** |
|
19
|
|
|
* {@inheritdoc} |
|
20
|
|
|
*/ |
|
21
|
|
|
public function registerBundles() |
|
22
|
|
|
{ |
|
23
|
|
|
return array( |
|
24
|
|
|
new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(), |
|
25
|
|
|
new \Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), |
|
26
|
|
|
new \Symfony\Bundle\MonologBundle\MonologBundle(), |
|
27
|
|
|
new \Symfony\Bundle\SecurityBundle\SecurityBundle(), |
|
28
|
|
|
new \Symfony\Bundle\TwigBundle\TwigBundle(), |
|
29
|
|
|
new \FOS\HttpCacheBundle\FOSHttpCacheBundle(), |
|
30
|
|
|
); |
|
31
|
|
|
} |
|
32
|
|
|
|
|
33
|
|
|
/** |
|
34
|
|
|
* {@inheritdoc} |
|
35
|
|
|
*/ |
|
36
|
|
|
public function registerContainerConfiguration(LoaderInterface $loader) |
|
37
|
|
|
{ |
|
38
|
|
|
$loader->load(__DIR__.'/config/config.yml'); |
|
39
|
|
|
|
|
40
|
|
|
if (class_exists('Symfony\Component\Asset\Package')) { |
|
41
|
|
|
$loader->load(function (ContainerBuilder $container) { |
|
42
|
|
|
$container->loadFromExtension('framework', array('assets' => array())); |
|
43
|
|
|
}); |
|
44
|
|
|
} |
|
45
|
|
|
} |
|
46
|
|
|
|
|
47
|
|
|
/** |
|
48
|
|
|
* {@inheritdoc} |
|
49
|
|
|
*/ |
|
50
|
|
|
public function getCacheDir() |
|
51
|
|
|
{ |
|
52
|
|
|
return sys_get_temp_dir().'/fos-http-cache-bundle/cache'; |
|
53
|
|
|
} |
|
54
|
|
|
|
|
55
|
|
|
/** |
|
56
|
|
|
* {@inheritdoc} |
|
57
|
|
|
*/ |
|
58
|
|
|
public function getLogDir() |
|
59
|
|
|
{ |
|
60
|
|
|
return sys_get_temp_dir().'/fos-http-cache-bundle/logs'; |
|
61
|
|
|
} |
|
62
|
|
|
|
|
63
|
|
|
/** |
|
64
|
|
|
* {@inheritdoc} |
|
65
|
|
|
*/ |
|
66
|
|
|
protected function getContainerBaseClass() |
|
67
|
|
|
{ |
|
68
|
|
|
return '\PSS\SymfonyMockerContainer\DependencyInjection\MockerContainer'; |
|
69
|
|
|
} |
|
70
|
|
|
|
|
71
|
|
|
/** |
|
72
|
|
|
* {@inheritdoc} |
|
73
|
|
|
*/ |
|
74
|
|
|
protected function prepareContainer(\Symfony\Component\DependencyInjection\ContainerBuilder $container) |
|
75
|
|
|
{ |
|
76
|
|
|
parent::prepareContainer($container); |
|
77
|
|
|
|
|
78
|
|
|
$container->setDefinition( |
|
79
|
|
|
'session.test_storage', |
|
80
|
|
|
new \Symfony\Component\DependencyInjection\Definition('FOS\HttpCacheBundle\Tests\Functional\Fixtures\Session\TestSessionStorage') |
|
81
|
|
|
); |
|
82
|
|
|
} |
|
83
|
|
|
} |
|
84
|
|
|
|