1 | <?php |
||
26 | abstract class AbstractKernel extends BaseKernel |
||
27 | { |
||
28 | /** |
||
29 | * @var null|string The path to the test's temp dir. A unique dir to this |
||
30 | * use case. |
||
31 | */ |
||
32 | private $testTempDir = null; |
||
33 | |||
34 | /** |
||
35 | * The class options passed during class construction. |
||
36 | * |
||
37 | * @var array |
||
38 | */ |
||
39 | protected $options = array(); |
||
40 | |||
41 | 1 | public function getUseCase() |
|
45 | |||
46 | |||
47 | /** |
||
48 | * Class constructor |
||
49 | * |
||
50 | * @param string $environment The app's run environment |
||
51 | * @param boolean $debug Should the app run in debug mode |
||
52 | * @param array $options Options for the Kernel. Allowed options are: |
||
53 | * - use_case : The current use case |
||
54 | * - root_dir : The app's root directory |
||
55 | * |
||
56 | * @uses configureOptions To configure an {@link |
||
57 | * http://symfony.com/doc/current/components/options_resolver.html |
||
58 | * OptionsResolver} to resolve $options |
||
59 | * @uses setResolvedOptions To set the options after they've been resolved. |
||
60 | */ |
||
61 | 9 | public function __construct($environment, $debug, array $options) |
|
71 | |||
72 | /** |
||
73 | * Configures $resolver for the $options passed to the {@see __construct |
||
74 | * constructor}. |
||
75 | */ |
||
76 | 12 | public static function configureOptions(OptionsResolverInterface $resolver) |
|
99 | |||
100 | 9 | protected function setResolvedOptions(array $options) |
|
104 | |||
105 | /** |
||
106 | */ |
||
107 | 9 | public function getRootDir() |
|
122 | |||
123 | /** |
||
124 | */ |
||
125 | 9 | public function registerBundles() |
|
126 | { |
||
127 | 5 | return include $this->rootDir.DIRECTORY_SEPARATOR.'bundles.php'; |
|
128 | 9 | } |
|
129 | |||
130 | /** |
||
131 | * Register container configuration |
||
132 | * |
||
133 | * @param LoaderInterface $loader Loader |
||
134 | */ |
||
135 | 4 | public function registerContainerConfiguration(LoaderInterface $loader) |
|
139 | |||
140 | 6 | public function getTestTempDir() |
|
153 | |||
154 | /** |
||
155 | * Return Cache dir |
||
156 | * |
||
157 | * @return string |
||
158 | * @uses getTestTempDir |
||
159 | */ |
||
160 | 6 | public function getCacheDir() |
|
164 | |||
165 | /** |
||
166 | * Return log dir |
||
167 | * |
||
168 | * @return string |
||
169 | * @uses getTestTempDir |
||
170 | */ |
||
171 | 4 | public function getLogDir() |
|
175 | } |
||
176 |