-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppKernel.php
More file actions
executable file
·78 lines (70 loc) · 3.31 KB
/
Copy pathAppKernel.php
File metadata and controls
executable file
·78 lines (70 loc) · 3.31 KB
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
69
70
71
72
73
74
75
76
77
78
<?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new JMS\SerializerBundle\JMSSerializerBundle(),
new Nelmio\CorsBundle\NelmioCorsBundle(),
new FOS\RestBundle\FOSRestBundle(),
new Nelmio\ApiDocBundle\NelmioApiDocBundle(),
new FOS\HttpCacheBundle\FOSHttpCacheBundle(),
new Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle(),
new Hautelook\TemplatedUriBundle\HautelookTemplatedUriBundle(),
new Bazinga\Bundle\RestExtraBundle\BazingaRestExtraBundle(),
new Sandbox\AdminShopApiBundle\SandboxAdminShopApiBundle(),
new Sandbox\ApiBundle\SandboxApiBundle(),
new Sandbox\ClientApiBundle\SandboxClientApiBundle(),
new Sandbox\AdminApiBundle\SandboxAdminApiBundle(),
new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(),
// new FOS\ElasticaBundle\FOSElasticaBundle(),
new Liuggio\ExcelBundle\LiuggioExcelBundle(),
new Sandbox\SalesApiBundle\SandboxSalesApiBundle(),
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
new Knp\Bundle\SnappyBundle\KnpSnappyBundle(),
// new Snc\RedisBundle\SncRedisBundle(),
new Sandbox\ClientPropertyApiBundle\SandboxClientPropertyApiBundle(),
new Sandbox\CommnueAdminApiBundle\CommnueAdminApiBundle(),
new Sandbox\CommnueClientApiBundle\CommnueClientApiBundle(),
);
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
$bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
}
return $bundles;
}
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
}
// for speedup Symfony2 on vagrant box
// public function getCacheDir()
// {
// if (in_array($this->environment, array('dev', 'test'))) {
// return '/dev/shm/sandbox-rest-api/cache/' . $this->environment;
// }
//
// return parent::getCacheDir();
// }
// public function getLogDir()
// {
// if (in_array($this->environment, array('dev', 'test'))) {
// return '/dev/shm/sandbox-rest-api/logs';
// }
//
// return parent::getLogDir();
// }
}