Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / symfony / http-kernel / DependencyInjection / Extension.php
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      * @deprecated since version 3.3, to be removed in 4.0.
32      */
33     public function getClassesToCompile()
34     {
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);
37         }
38
39         return $this->classes;
40     }
41
42     /**
43      * Gets the annotated classes to cache.
44      *
45      * @return array An array of classes
46      */
47     public function getAnnotatedClassesToCompile()
48     {
49         return $this->annotatedClasses;
50     }
51
52     /**
53      * Adds classes to the class cache.
54      *
55      * @param array $classes An array of class patterns
56      *
57      * @deprecated since version 3.3, to be removed in 4.0.
58      */
59     public function addClassesToCompile(array $classes)
60     {
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);
63         }
64
65         $this->classes = array_merge($this->classes, $classes);
66     }
67
68     /**
69      * Adds annotated classes to the class cache.
70      *
71      * @param array $annotatedClasses An array of class patterns
72      */
73     public function addAnnotatedClassesToCompile(array $annotatedClasses)
74     {
75         $this->annotatedClasses = array_merge($this->annotatedClasses, $annotatedClasses);
76     }
77 }