Security update for Core, with self-updated composer
[yaffs-website] / web / core / lib / Drupal / Core / Config / FileStorageFactory.php
1 <?php
2
3 namespace Drupal\Core\Config;
4
5 /**
6  * Provides a factory for creating config file storage objects.
7  */
8 class FileStorageFactory {
9
10   /**
11    * Returns a FileStorage object working with the active config directory.
12    *
13    * @return \Drupal\Core\Config\FileStorage FileStorage
14    *
15    * @deprecated in Drupal 8.0.x and will be removed before 9.0.0. Drupal core
16    * no longer creates an active directory.
17    */
18   public static function getActive() {
19     return new FileStorage(config_get_config_directory(CONFIG_ACTIVE_DIRECTORY));
20   }
21
22   /**
23    * Returns a FileStorage object working with the sync config directory.
24    *
25    * @return \Drupal\Core\Config\FileStorage FileStorage
26    */
27   public static function getSync() {
28     return new FileStorage(config_get_config_directory(CONFIG_SYNC_DIRECTORY));
29   }
30
31 }