You are here

class GhostStorage in Configuration Split 8

Class GhostStorage.

A GhostStorage acts like the normal Storage it wraps. All reading operations return the values of the decorated storage but write operations are silently ignored and the ghost pretends that the operation was successful.

@package Drupal\config_split\Config

Hierarchy

Expanded class hierarchy of GhostStorage

2 files declare their use of GhostStorage
ConfigSplitCliService.php in src/ConfigSplitCliService.php
GhostStorageTest.php in src/Tests/GhostStorageTest.php

File

src/Config/GhostStorage.php, line 17

Namespace

Drupal\config_split\Config
View source
class GhostStorage extends ReadOnlyStorage implements StorageInterface {

  /**
   * {@inheritdoc}
   */
  public function write($name, array $data) {
    return TRUE;
  }

  /**
   * {@inheritdoc}
   */
  public function delete($name) {
    return TRUE;
  }

  /**
   * {@inheritdoc}
   */
  public function rename($name, $new_name) {
    return TRUE;
  }

  /**
   * {@inheritdoc}
   */
  public function deleteAll($prefix = '') {
    return TRUE;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
GhostStorage::delete public function Deletes a configuration object from the storage. Overrides StorageInterface::delete
GhostStorage::deleteAll public function Deletes configuration objects whose names start with a given prefix. Overrides StorageInterface::deleteAll
GhostStorage::rename public function Renames a configuration object in the storage. Overrides StorageInterface::rename
GhostStorage::write public function Writes configuration data to the storage. Overrides StorageInterface::write
StorageInterface::createCollection public function Creates a collection on the storage. 8
StorageInterface::decode public function Decodes configuration data from the storage-specific format. 8
StorageInterface::DEFAULT_COLLECTION constant The default collection name.
StorageInterface::encode public function Encodes configuration data into the storage-specific format. 8
StorageInterface::exists public function Returns whether a configuration object exists. 8
StorageInterface::getAllCollectionNames public function Gets the existing collections. 8
StorageInterface::getCollectionName public function Gets the name of the current collection the storage is using. 8
StorageInterface::listAll public function Gets configuration object names starting with a given prefix. 8
StorageInterface::read public function Reads configuration data from the storage. 8
StorageInterface::readMultiple public function Reads configuration data from the storage. 8