4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\HttpKernel\DependencyInjection;
14 use Symfony\Component\DependencyInjection\Extension\Extension as BaseExtension;
17 * Allow adding classes to the class cache.
19 * @author Fabien Potencier <fabien@symfony.com>
21 abstract class Extension extends BaseExtension
23 private $classes = array();
24 private $annotatedClasses = array();
27 * Gets the classes to cache.
29 * @return array An array of classes
31 * @deprecated since version 3.3, to be removed in 4.0.
33 public function getClassesToCompile()
35 if (\PHP_VERSION_ID >= 70000) {
36 @trigger_error(__METHOD__.'() is deprecated since Symfony 3.3, to be removed in 4.0.', E_USER_DEPRECATED);
39 return $this->classes;
43 * Gets the annotated classes to cache.
45 * @return array An array of classes
47 public function getAnnotatedClassesToCompile()
49 return $this->annotatedClasses;
53 * Adds classes to the class cache.
55 * @param array $classes An array of class patterns
57 * @deprecated since version 3.3, to be removed in 4.0.
59 public function addClassesToCompile(array $classes)
61 if (\PHP_VERSION_ID >= 70000) {
62 @trigger_error(__METHOD__.'() is deprecated since Symfony 3.3, to be removed in 4.0.', E_USER_DEPRECATED);
65 $this->classes = array_merge($this->classes, $classes);
69 * Adds annotated classes to the class cache.
71 * @param array $annotatedClasses An array of class patterns
73 public function addAnnotatedClassesToCompile(array $annotatedClasses)
75 $this->annotatedClasses = array_merge($this->annotatedClasses, $annotatedClasses);