Chris@0
|
1 <?php
|
Chris@0
|
2
|
Chris@0
|
3 /*
|
Chris@0
|
4 * This file is part of the Symfony package.
|
Chris@0
|
5 *
|
Chris@0
|
6 * (c) Fabien Potencier <fabien@symfony.com>
|
Chris@0
|
7 *
|
Chris@0
|
8 * For the full copyright and license information, please view the LICENSE
|
Chris@0
|
9 * file that was distributed with this source code.
|
Chris@0
|
10 */
|
Chris@0
|
11
|
Chris@0
|
12 namespace Symfony\Component\HttpKernel\Bundle;
|
Chris@0
|
13
|
Chris@0
|
14 use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
Chris@0
|
15 use Symfony\Component\DependencyInjection\ContainerBuilder;
|
Chris@0
|
16 use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
|
Chris@0
|
17
|
Chris@0
|
18 /**
|
Chris@0
|
19 * BundleInterface.
|
Chris@0
|
20 *
|
Chris@0
|
21 * @author Fabien Potencier <fabien@symfony.com>
|
Chris@0
|
22 */
|
Chris@0
|
23 interface BundleInterface extends ContainerAwareInterface
|
Chris@0
|
24 {
|
Chris@0
|
25 /**
|
Chris@0
|
26 * Boots the Bundle.
|
Chris@0
|
27 */
|
Chris@0
|
28 public function boot();
|
Chris@0
|
29
|
Chris@0
|
30 /**
|
Chris@0
|
31 * Shutdowns the Bundle.
|
Chris@0
|
32 */
|
Chris@0
|
33 public function shutdown();
|
Chris@0
|
34
|
Chris@0
|
35 /**
|
Chris@0
|
36 * Builds the bundle.
|
Chris@0
|
37 *
|
Chris@0
|
38 * It is only ever called once when the cache is empty.
|
Chris@0
|
39 */
|
Chris@0
|
40 public function build(ContainerBuilder $container);
|
Chris@0
|
41
|
Chris@0
|
42 /**
|
Chris@0
|
43 * Returns the container extension that should be implicitly loaded.
|
Chris@0
|
44 *
|
Chris@0
|
45 * @return ExtensionInterface|null The default extension or null if there is none
|
Chris@0
|
46 */
|
Chris@0
|
47 public function getContainerExtension();
|
Chris@0
|
48
|
Chris@0
|
49 /**
|
Chris@0
|
50 * Returns the bundle name that this bundle overrides.
|
Chris@0
|
51 *
|
Chris@0
|
52 * Despite its name, this method does not imply any parent/child relationship
|
Chris@0
|
53 * between the bundles, just a way to extend and override an existing
|
Chris@0
|
54 * bundle.
|
Chris@0
|
55 *
|
Chris@0
|
56 * @return string The Bundle name it overrides or null if no parent
|
Chris@14
|
57 *
|
Chris@14
|
58 * @deprecated This method is deprecated as of 3.4 and will be removed in 4.0.
|
Chris@0
|
59 */
|
Chris@0
|
60 public function getParent();
|
Chris@0
|
61
|
Chris@0
|
62 /**
|
Chris@0
|
63 * Returns the bundle name (the class short name).
|
Chris@0
|
64 *
|
Chris@0
|
65 * @return string The Bundle name
|
Chris@0
|
66 */
|
Chris@0
|
67 public function getName();
|
Chris@0
|
68
|
Chris@0
|
69 /**
|
Chris@0
|
70 * Gets the Bundle namespace.
|
Chris@0
|
71 *
|
Chris@0
|
72 * @return string The Bundle namespace
|
Chris@0
|
73 */
|
Chris@0
|
74 public function getNamespace();
|
Chris@0
|
75
|
Chris@0
|
76 /**
|
Chris@0
|
77 * Gets the Bundle directory path.
|
Chris@0
|
78 *
|
Chris@0
|
79 * The path should always be returned as a Unix path (with /).
|
Chris@0
|
80 *
|
Chris@0
|
81 * @return string The Bundle absolute path
|
Chris@0
|
82 */
|
Chris@0
|
83 public function getPath();
|
Chris@0
|
84 }
|