You are here

public function AcquiaPurgeStateCounter::__construct in Acquia Purge 7

Construct a state item object.

Parameters

AcquiaPurgeStateStorageInterface $storage: The state storage in which the item has been stored.

int $key: The key with which the object is stored in state storage.

mixed $value: The value of the state item.

Overrides AcquiaPurgeStateItem::__construct

File

lib/state/AcquiaPurgeStateCounter.php, line 16
Contains AcquiaPurgeStateCounter.

Class

AcquiaPurgeStateCounter
Provides a single counter kept in state storage.

Code

public function __construct(AcquiaPurgeStateStorageInterface $storage, $key, $value) {
  parent::__construct($storage, $key, $value);
  if (!is_int($this->value)) {
    $this->value = (int) $this->value;
  }
}