/** * @param kObjectCopiedEventConsumer $consumer * @return bool true if should continue to the next consumer */ protected function doConsume(KalturaEventConsumer $consumer) { if (!$consumer->shouldConsumeCopiedEvent($this->fromObject, $this->toObject)) { return true; } $additionalLog1 = ''; $additionalLog2 = ''; if (method_exists($this->fromObject, 'getId')) { $additionalLog1 .= 'id [' . $this->fromObject->getId() . ']'; } if (method_exists($this->toObject, 'getId')) { $additionalLog2 .= 'id [' . $this->toObject->getId() . ']'; } KalturaLog::debug(get_class($this) . " event consumed by " . get_class($consumer) . " from object type [" . get_class($this->fromObject) . "] {$additionalLog1} to object type [" . get_class($this->toObject) . "] {$additionalLog2}"); return $consumer->objectCopied($this->fromObject, $this->toObject); }
/** * @param kObjectCopiedEventConsumer $consumer * @return bool true if should continue to the next consumer */ protected function doConsume(KalturaEventConsumer $consumer) { if (!$consumer->shouldConsumeCopiedEvent($this->fromObject, $this->toObject)) { return true; } $additionalLog1 = ''; $additionalLog2 = ''; if (method_exists($this->fromObject, 'getId')) { $additionalLog1 .= 'id [' . $this->fromObject->getId() . ']'; } if (method_exists($this->toObject, 'getId')) { $additionalLog2 .= 'id [' . $this->toObject->getId() . ']'; } KalturaLog::debug('consumer [' . get_class($consumer) . '] started handling [' . get_class($this) . '] from object type [' . get_class($this->fromObject) . "] {$additionalLog1} to object type [" . get_class($this->toObject) . "] {$additionalLog2}"); $result = $consumer->objectCopied($this->fromObject, $this->toObject); KalturaLog::debug('consumer [' . get_class($consumer) . '] finished handling [' . get_class($this) . '] from object type [' . get_class($this->fromObject) . "] {$additionalLog1} to object type [" . get_class($this->toObject) . "] {$additionalLog2}"); return $result; }