You are here

public function EventHandler::getObjectCacheOrCache in Services Client 7.2

Retrieve current object from cache. If not currently in object cache adds object to object cache.

Return value

stdClass Event object.

1 call to EventHandler::getObjectCacheOrCache()
EventHandler::objectCached in include/event.inc
Retrieve instance of object initialized with object cache.

File

include/event.inc, line 460

Class

EventHandler
Event handler plugin.

Code

public function getObjectCacheOrCache() {
  $event = $this
    ->getObjectCache();
  if (empty($event)) {
    $this
      ->setObjectCache();
    return $this
      ->getEvent();
  }
  return $event;
}