comparison vendor/symfony/http-kernel/CacheClearer/ChainCacheClearer.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents 4c8ae668cc8c
children 129ea1e6d783
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
13 13
14 /** 14 /**
15 * ChainCacheClearer. 15 * ChainCacheClearer.
16 * 16 *
17 * @author Dustin Dobervich <ddobervich@gmail.com> 17 * @author Dustin Dobervich <ddobervich@gmail.com>
18 *
19 * @final since version 3.4
18 */ 20 */
19 class ChainCacheClearer implements CacheClearerInterface 21 class ChainCacheClearer implements CacheClearerInterface
20 { 22 {
21 /**
22 * @var array
23 */
24 protected $clearers; 23 protected $clearers;
25 24
26 /** 25 /**
27 * Constructs a new instance of ChainCacheClearer. 26 * Constructs a new instance of ChainCacheClearer.
28 * 27 *
29 * @param array $clearers The initial clearers 28 * @param array $clearers The initial clearers
30 */ 29 */
31 public function __construct(array $clearers = array()) 30 public function __construct($clearers = array())
32 { 31 {
33 $this->clearers = $clearers; 32 $this->clearers = $clearers;
34 } 33 }
35 34
36 /** 35 /**
44 } 43 }
45 44
46 /** 45 /**
47 * Adds a cache clearer to the aggregate. 46 * Adds a cache clearer to the aggregate.
48 * 47 *
49 * @param CacheClearerInterface $clearer 48 * @deprecated since version 3.4, to be removed in 4.0, inject the list of clearers as a constructor argument instead.
50 */ 49 */
51 public function add(CacheClearerInterface $clearer) 50 public function add(CacheClearerInterface $clearer)
52 { 51 {
52 @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.4 and will be removed in 4.0, inject the list of clearers as a constructor argument instead.', __METHOD__), E_USER_DEPRECATED);
53
53 $this->clearers[] = $clearer; 54 $this->clearers[] = $clearer;
54 } 55 }
55 } 56 }