Version 1
[yaffs-website] / vendor / drush / drush / lib / Drush / Config / StorageFilter.php
1 <?php
2
3 /**
4  * @file
5  * Definition of Drush\Config\StorageFilter.
6  */
7
8 namespace Drush\Config;
9
10 use Drupal\Core\Config\StorageInterface;
11
12 interface StorageFilter {
13
14   /**
15    * Filters configuration data after it is read from storage.
16    *
17    * @param string $name
18    *   The name of a configuration object to load.
19    * @param array $data
20    *   The configuration data to filter.
21    *
22    * @return array $data
23    *   The filtered data.
24    */
25   public function filterRead($name, $data);
26
27   /**
28    * Filter configuration data before it is written to storage.
29    *
30    * @param string $name
31    *   The name of a configuration object to save.
32    * @param array $data
33    *   The configuration data to filter.
34    * @param StorageInterface
35    *   The storage object that the filtered data will be
36    *   written to.  Provided in case the filter needs to
37    *   read the existing configuration before writing it.
38    *
39    * @return array $data
40    *   The filtered data.
41    */
42   public function filterWrite($name, array $data, StorageInterface $storage);
43
44 }