You are here

public function TxBuffer::getProperty in Purge 8.3

Retrieve a stored property for the given invalidation object.

Parameters

\Drupal\purge\Plugin\Purge\Invalidation\InvalidationInterface $invalidation: Invalidation object.

string $property: The string key of the stored property you want to receive.

mixed $default: The return value for when the property is not found.

Return value

mixed|null The stored property value or the value of the $default argument.

Overrides TxBufferInterface::getProperty

File

src/Plugin/Purge/Queue/TxBuffer.php, line 118

Class

TxBuffer
Provides the transaction buffer.

Namespace

Drupal\purge\Plugin\Purge\Queue

Code

public function getProperty(InvalidationInterface $invalidation, $property, $default = NULL) {
  if (!isset($this->properties[$invalidation
    ->getId()][$property])) {
    return $default;
  }
  return $this->properties[$invalidation
    ->getId()][$property];
}