You are here

public function AcquiaPurgeQueueItem::__get in Acquia Purge 7

Retrieve a property.

Parameters

string $name: The name of the property, can be 'item_id', 'created' or 'data'.

Return value

mixed

Throws

\RuntimeException Thrown when the requested property isn't 'item_id', 'created' or 'data'.

Overrides AcquiaPurgeQueueItemInterface::__get

See also

http://php.net/manual/en/language.oop5.overloading.php#object.get

File

lib/queue/AcquiaPurgeQueueItem.php, line 91

Class

AcquiaPurgeQueueItem
Provides a queue item object.

Code

public function __get($name) {
  if (!isset($this->properties[$name])) {
    throw new RuntimeException("The property '{$name}' does not exist.");
  }
  return $this->{$name};
}