You are here

FileStorageFactory.php in Zircon Profile 8

Same filename and directory in other branches
  1. 8.0 core/lib/Drupal/Core/Config/FileStorageFactory.php

Namespace

Drupal\Core\Config

File

core/lib/Drupal/Core/Config/FileStorageFactory.php
View source
<?php

/**
 * @file
 * Contains \Drupal\Core\Config\FileStorageFactory.
 */
namespace Drupal\Core\Config;


/**
 * Provides a factory for creating config file storage objects.
 */
class FileStorageFactory {

  /**
   * Returns a FileStorage object working with the active config directory.
   *
   * @return \Drupal\Core\Config\FileStorage FileStorage
   *
   * @deprecated in Drupal 8.0.x and will be removed before 9.0.0. Drupal core
   * no longer creates an active directory.
   */
  static function getActive() {
    return new FileStorage(config_get_config_directory(CONFIG_ACTIVE_DIRECTORY));
  }

  /**
   * Returns a FileStorage object working with the sync config directory.
   *
   * @return \Drupal\Core\Config\FileStorage FileStorage
   */
  static function getSync() {
    return new FileStorage(config_get_config_directory(CONFIG_SYNC_DIRECTORY));
  }

}

Classes

Namesort descending Description
FileStorageFactory Provides a factory for creating config file storage objects.