Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/http-kernel/DependencyInjection/Extension.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children | 1fec387a4317 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 /* | |
4 * This file is part of the Symfony package. | |
5 * | |
6 * (c) Fabien Potencier <fabien@symfony.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 namespace Symfony\Component\HttpKernel\DependencyInjection; | |
13 | |
14 use Symfony\Component\DependencyInjection\Extension\Extension as BaseExtension; | |
15 | |
16 /** | |
17 * Allow adding classes to the class cache. | |
18 * | |
19 * @author Fabien Potencier <fabien@symfony.com> | |
20 */ | |
21 abstract class Extension extends BaseExtension | |
22 { | |
23 private $classes = array(); | |
24 private $annotatedClasses = array(); | |
25 | |
26 /** | |
27 * Gets the classes to cache. | |
28 * | |
29 * @return array An array of classes | |
30 */ | |
31 public function getClassesToCompile() | |
32 { | |
33 return $this->classes; | |
34 } | |
35 | |
36 /** | |
37 * Gets the annotated classes to cache. | |
38 * | |
39 * @return array An array of classes | |
40 */ | |
41 public function getAnnotatedClassesToCompile() | |
42 { | |
43 return $this->annotatedClasses; | |
44 } | |
45 | |
46 /** | |
47 * Adds classes to the class cache. | |
48 * | |
49 * @param array $classes An array of class patterns | |
50 */ | |
51 public function addClassesToCompile(array $classes) | |
52 { | |
53 $this->classes = array_merge($this->classes, $classes); | |
54 } | |
55 | |
56 /** | |
57 * Adds annotated classes to the class cache. | |
58 * | |
59 * @param array $annotatedClasses An array of class patterns | |
60 */ | |
61 public function addAnnotatedClassesToCompile(array $annotatedClasses) | |
62 { | |
63 $this->annotatedClasses = array_merge($this->annotatedClasses, $annotatedClasses); | |
64 } | |
65 } |