shares = $shares; } /** * The xmlSerialize method is called during xml writing. * * @param Writer $writer * @return void */ public function xmlSerialize(Writer $writer) { foreach ($this->shares as $share) { $writer->startElement('{' . self::NS_NEXTCLOUD . '}sharee'); $writer->writeElement('{' . self::NS_NEXTCLOUD . '}id', $share->getSharedWith()); $writer->writeElement('{' . self::NS_NEXTCLOUD . '}display-name', $share->getSharedWithDisplayName()); $writer->writeElement('{' . self::NS_NEXTCLOUD . '}type', $share->getShareType()); $writer->endElement(); } } }