/** * Takes the model data from the data object and stores it in the repository cache. * * @param \Rhubarb\Stem\Models\Model $object */ protected final function cacheObjectData(Model $object) { $uniqueIdentifier = $object->UniqueIdentifier; if ($uniqueIdentifier === null) { return; } if (!isset($this->cachedObjectData[$uniqueIdentifier])) { $this->cachedObjectData[$uniqueIdentifier] = $object->exportRawData(); } else { $this->cachedObjectData[$uniqueIdentifier] = array_merge($this->cachedObjectData[$uniqueIdentifier], $object->exportRawData()); } }