EclipseGc

DrupalVerifiedStorageFile.php

Feb 20th, 2012
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.90 KB | None | 0 0
  1. <?php
  2.  
  3. namespace Drupal\Core\Config;
  4.  
  5. use Drupal\Core\Config\DrupalConfigVerifiedStorage;
  6.  
  7. /**
  8.  * Represents an SQL-based configuration storage object.
  9.  */
  10. class DrupalVerifiedStorageFile extends DrupalConfigVerifiedStorage {
  11.  
  12.   /**
  13.    * Implements DrupalConfigVerifiedStorage::read().
  14.    */
  15.   public function read() {
  16.     $file = config_get_config_directory() . '/' . $this->name . '.xml';
  17.     return file_get_contents($file);
  18.   }
  19.  
  20.   /**
  21.    * Implements DrupalConfigVerifiedStorageInterface::writeToActive().
  22.    */
  23.   public function writeToActive($data) {
  24.     return $this->writeToFile($data);
  25.   }
  26.  
  27.   /**
  28.    * @todo
  29.    */
  30.   public function deleteFromActive() {
  31.   }
  32.  
  33.   /**
  34.    * Implements DrupalConfigVerifiedStorageInterface::getNamesWithPrefix().
  35.    */
  36.   static public function getNamesWithPrefix($prefix = '') {
  37.     config_get_signed_file_storage_names_with_prefix($prefix);
  38.   }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment