/** * @param \Riak\Client\Core\Query\RiakObject $riakObject * * @return array */ public function convertToRiakContent(RiakObject $riakObject) { $content = new Content(); $metas = $riakObject->getUserMeta(); $indexes = $riakObject->getIndexes(); $links = $riakObject->getLinks(); $content->contentType = $riakObject->getContentType() ?: RiakObject::DEFAULT_CONTENT_TYPE; $content->lastModified = $riakObject->getLastModified(); $content->isDeleted = $riakObject->getIsDeleted(); $content->value = $riakObject->getValue(); $content->vtag = $riakObject->getVtag(); $content->indexes = []; $content->metas = []; if ($indexes != null) { $content->indexes = $indexes->toFullNameArray(); } if ($metas != null) { $content->metas = $metas->toArray(); } if ($links != null) { $content->links = $links->toArray(); } return $content; }