You are here

public function AcquiaPurgeStateStorageBase::set in Acquia Purge 7

Store the state item in state item storage.

Parameters

AcquiaPurgeStateItemInterface $item: The AcquiaPurgeStateItemInterface object to store.

Overrides AcquiaPurgeStateStorageInterface::set

File

lib/state/AcquiaPurgeStateStorageBase.php, line 63
Contains AcquiaPurgeStateStorageBase.

Class

AcquiaPurgeStateStorageBase
Base layer for state storage backends.

Code

public function set(AcquiaPurgeStateItemInterface $item) {
  if (!$this->commit) {
    $this->commit = TRUE;
    drupal_register_shutdown_function(array(
      $this,
      'commit',
    ));
  }
  $this->items[$item
    ->getKey()] = $item;
  $this->buffer[$item
    ->getKey()] = $item
    ->get();
}