/**
  * @param kObjectSavedEventConsumer $consumer
  * @return bool true if should continue to the next consumer
  */
 protected function doConsume(KalturaEventConsumer $consumer)
 {
     if (!$consumer->shouldConsumeSavedEvent($this->object)) {
         return true;
     }
     $additionalLog = '';
     if (method_exists($this->object, 'getId')) {
         $additionalLog .= 'id [' . $this->object->getId() . ']';
     }
     KalturaLog::debug(get_class($this) . ' event consumed by ' . get_class($consumer) . ' object type [' . get_class($this->object) . '] ' . $additionalLog);
     return $consumer->objectSaved($this->object);
 }
示例#2
0
 /**
  * @param kObjectSavedEventConsumer $consumer
  * @return bool true if should continue to the next consumer
  */
 protected function doConsume(KalturaEventConsumer $consumer)
 {
     if (!$consumer->shouldConsumeSavedEvent($this->object)) {
         return true;
     }
     $additionalLog = '';
     if (method_exists($this->object, 'getId')) {
         $additionalLog .= 'id [' . $this->object->getId() . ']';
     }
     KalturaLog::debug('consumer [' . get_class($consumer) . '] started handling [' . get_class($this) . '] object type [' . get_class($this->object) . '] ' . $additionalLog);
     $result = $consumer->objectSaved($this->object);
     KalturaLog::debug('consumer [' . get_class($consumer) . '] finished handling [' . get_class($this) . '] object type [' . get_class($this->object) . '] ' . $additionalLog);
     return $result;
 }