This repository was archived by the owner on Apr 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathAppKernel.php
More file actions
67 lines (56 loc) · 2.19 KB
/
AppKernel.php
File metadata and controls
67 lines (56 loc) · 2.19 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
<?php
/**
* This file is part of Gitonomy.
*
* (c) Alexandre Salomé <alexandre.salome@gmail.com>
* (c) Julien DIDIER <genzo.wm@gmail.com>
*
* This source file is subject to the GPL license that is bundled
* with this source code in the file LICENSE.
*/
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
class AppKernel extends Kernel
{
const VERSION = '0.5-DEV';
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\AsseticBundle\AsseticBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
new Buzz\Bundle\BuzzBundle\BuzzBundle(),
new Gitonomy\Bundle\CoreBundle\GitonomyCoreBundle(),
new Gitonomy\Bundle\WebsiteBundle\GitonomyWebsiteBundle(),
new Gitonomy\Bundle\GitBundle\GitonomyGitBundle(),
new Gitonomy\Bundle\JobBundle\GitonomyJobBundle(),
);
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Gitonomy\Bundle\DistributionBundle\GitonomyDistributionBundle();
}
return $bundles;
}
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
}
protected function getKernelParameters()
{
return array_merge(
parent::getKernelParameters(), array(
'gitonomy.shell_command' => $this->getShellCommand(),
'gitonomy.version' => self::VERSION,
)
);
}
protected function getShellCommand()
{
return 'php '.realpath($this->getRootDir().'/console').' gitonomy:git';
}
}