42 return json_encode($component,
$options);
56 $writer->openMemory();
57 $writer->setIndent(
true);
59 $writer->startDocument(
'1.0',
'utf-8');
63 $writer->startElement(
'icalendar');
64 $writer->writeAttribute(
'xmlns',
Parser\Xml::XCAL_NAMESPACE);
68 $writer->startElement(
'vcards');
69 $writer->writeAttribute(
'xmlns',
Parser\Xml::XCARD_NAMESPACE);
75 $writer->endElement();
77 return $writer->outputMemory();
iCalendar/vCard/jCal/jCard/xCal/xCard writer object.
static write(Component $component)
Serializes a vCard or iCalendar object.
serialize()
Turns the object back into a serialized blob.
static writeJson(Component $component, $options=0)
Serializes a jCal or jCard object.
static writeXml(Component $component)
Serializes a xCal or xCard object.
xmlSerialize(Xml\Writer $writer)
This method serializes the data into XML.