/** * @param SourceInterface $object * * @return integer[] */ public function getObjectPayload($object) { return [$object->getId()]; }
/** * Adds source to the internal cache * * @param SourceInterface $source */ protected function cache(SourceInterface $source = null) { if (null === $source) { return; } // mark as visited $source->setDatetimeLastVisited(new \DateTime()); // cache by id if ($source->getId()) { $this->sources[$source->getId()] = $source; } // cache by origin if (null === ($feed = $source->getFeed()) || !$source->getOriginalId()) { return; } $hash = $this->getFeedHash($feed); $originalId = $source->getOriginalId(); $this->originSources[$hash][$originalId] = $source; }