class AcquiaPurgeStateItem in Acquia Purge 7
Provides a single state item kept in state storage.
Hierarchy
- class \AcquiaPurgeStateItem implements AcquiaPurgeStateItemInterface
Expanded class hierarchy of AcquiaPurgeStateItem
File
- lib/
state/ AcquiaPurgeStateItem.php, line 11 - Contains AcquiaPurgeStateItem.
View source
class AcquiaPurgeStateItem implements AcquiaPurgeStateItemInterface {
/**
* The state storage in which the item has been stored.
*
* @var AcquiaPurgeStateStorageInterface
*/
protected $storage;
/**
* The key with which the object is stored in state storage.
*
* @var string
*/
protected $key;
/**
* The value of the state item.
*
* @var mixed
*/
protected $value;
/**
* {@inheritdoc}
*/
public function __construct(AcquiaPurgeStateStorageInterface $storage, $key, $value) {
$this->storage = $storage;
$this->value = $value;
$this->key = $key;
}
/**
* {@inheritdoc}
*/
public function get() {
return $this->value;
}
/**
* {@inheritdoc}
*/
public function getKey() {
return $this->key;
}
/**
* {@inheritdoc}
*/
public function set($value) {
$this->value = $value;
$this->storage
->set($this);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AcquiaPurgeStateItem:: |
protected | property | The key with which the object is stored in state storage. | |
AcquiaPurgeStateItem:: |
protected | property | The state storage in which the item has been stored. | |
AcquiaPurgeStateItem:: |
protected | property | The value of the state item. | |
AcquiaPurgeStateItem:: |
public | function |
Get the item value. Overrides AcquiaPurgeStateItemInterface:: |
|
AcquiaPurgeStateItem:: |
public | function |
Get the item key. Overrides AcquiaPurgeStateItemInterface:: |
|
AcquiaPurgeStateItem:: |
public | function |
Store the state item in state item storage. Overrides AcquiaPurgeStateItemInterface:: |
1 |
AcquiaPurgeStateItem:: |
public | function |
Construct a state item object. Overrides AcquiaPurgeStateItemInterface:: |
1 |