You are here

class Aggregates in Advanced CSS/JS Aggregation 8.2

Provides AdvAgg with saved aggregrate information using a key value store.

Hierarchy

Expanded class hierarchy of Aggregates

1 string reference to 'Aggregates'
advagg.services.yml in ./advagg.services.yml
advagg.services.yml
1 service uses Aggregates
state.advagg.aggregates in ./advagg.services.yml
Drupal\advagg\State\Aggregates

File

src/State/Aggregates.php, line 13

Namespace

Drupal\advagg\State
View source
class Aggregates extends State implements StateInterface {

  /**
   * Constructs the State object.
   *
   * @param \Drupal\Core\KeyValueStore\KeyValueFactoryInterface $key_value_factory
   *   The key value store to use.
   * @param \Drupal\Core\Cache\CacheBackendInterface $cache
   *   The cache object to use.
   * @param \Drupal\Core\Lock\LockBackendInterface $lock
   *   The lock object to use.
   */
  public function __construct(KeyValueFactoryInterface $key_value_factory, CacheBackendInterface $cache, LockBackendInterface $lock) {
    parent::__construct($key_value_factory, $cache, $lock);
    $this->keyValueStore = $key_value_factory
      ->get('advagg_aggregates');
    $this->pathColumn = 'uri';
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Aggregates::__construct public function Constructs the State object. Overrides State::__construct
State::$cache protected property Static state cache.
State::$keyValueStore protected property The key value store to use.
State::$pathColumn protected property If the array isn't keyed by filepath the column the filepath is stored in.
State::clearMissingFiles public function Scan the filesystem for missing files and removee from database.
State::delete public function Deletes an item. Overrides StateInterface::delete
State::deleteAll public function Delete all stored information from this Key Value Store.
State::deleteMultiple public function Deletes multiple items. Overrides StateInterface::deleteMultiple
State::get public function Returns the stored value for a given key. Overrides StateInterface::get
State::getAll public function Gets all stored information from this Key Value Store.
State::getMultiple public function Returns the stored key/value pairs for a given set of keys. Overrides StateInterface::getMultiple
State::getRandom public function Get a semi-random (randomness not guaranteed) value.
State::getRandomKey public function Get a semi-random (randomness not guaranteed) key.
State::resetCache public function Resets the static cache. Overrides StateInterface::resetCache
State::set public function Saves a value for a given key. Overrides StateInterface::set
State::setMultiple public function Saves key/value pairs. Overrides StateInterface::setMultiple