ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\VObject\Reader Class Reference

iCalendar/vCard/jCal/jCard/xCal/xCard reader object. More...

+ Collaboration diagram for Sabre\VObject\Reader:

Static Public Member Functions

static read ($data, $options=0, $charset='UTF-8')
 Parses a vCard or iCalendar object, and returns the top component. More...
 
static readJson ($data, $options=0)
 Parses a jCard or jCal object, and returns the top component. More...
 
static readXML ($data, $options=0)
 Parses a xCard or xCal object, and returns the top component. More...
 

Data Fields

const OPTION_FORGIVING = 1
 If this option is passed to the reader, it will be less strict about the validity of the lines. More...
 
const OPTION_IGNORE_INVALID_LINES = 2
 If this option is turned on, any lines we cannot parse will be ignored by the reader. More...
 

Detailed Description

iCalendar/vCard/jCal/jCard/xCal/xCard reader object.

This object provides a few (static) convenience methods to quickly access the parsers.

Author
Evert Pot (http://evertpot.com/) http://sabre.io/license/ Modified BSD License

Definition at line 15 of file Reader.php.

Member Function Documentation

◆ read()

static Sabre\VObject\Reader::read (   $data,
  $options = 0,
  $charset = 'UTF-8' 
)
static

Parses a vCard or iCalendar object, and returns the top component.

The options argument is a bitfield. Pass any of the OPTIONS constant to alter the parsers' behaviour.

You can either supply a string, or a readable stream for input.

Parameters
string | resource$data
int$options
string$charset
Returns
Document

Definition at line 42 of file Reader.php.

References $data, PHPMailer\PHPMailer\$options, $parser, and $result.

Referenced by Sabre\VObject\Splitter\ICalendar\__construct(), Sabre\VObject\FreeBusyGeneratorTest\assertFreeBusyReport(), Sabre\VObject\Component\VCardTest\assertValidate(), Sabre\VObject\Component\VCalendarTest\assertValidate(), Sabre\VObject\Parser\XmlTest\assertXMLReflexivelyEqualsToMimeDir(), Sabre\CalDAV\Plugin\calendarMultiGetReport(), Sabre\CalDAV\Schedule\Plugin\calendarObjectChange(), Sabre\CalDAV\Schedule\Inbox\calendarQuery(), Sabre\CalDAV\Plugin\calendarQueryReport(), Sabre\CardDAV\Plugin\convertVCard(), Sabre\CalDAV\Plugin\freeBusyQueryReport(), Sabre\CalDAV\ICSExportPlugin\generateResponse(), Sabre\CardDAV\VCFExportPlugin\generateVCF(), Sabre\VObject\WriterTest\getComponent(), Sabre\CalDAV\Backend\PDO\getDenormalizedData(), Sabre\CalDAV\Schedule\Plugin\getFreeBusyForEmail(), Sabre\CalDAV\Plugin\httpAfterGet(), Sabre\CalDAV\ICSExportPlugin\mergeObjects(), Sabre\CalDAV\Schedule\Plugin\outboxRequest(), Sabre\VObject\ITip\Broker\parseEvent(), Sabre\VObject\ITip\BrokerTester\process(), Sabre\CalDAV\Schedule\Plugin\scheduleLocalDelivery(), Sabre\VObject\BirthdayCalendarGenerator\setObjects(), Sabre\VObject\FreeBusyGenerator\setObjects(), Sabre\CalDAV\ICSExportPluginTest\testACLIntegrationNotBlocked(), Sabre\VObject\Recur\SameDateForRecurringEventsTest\testAllEventsArePresentInIterator(), Sabre\VObject\Property\UriTest\testAlwaysEncodeUriVCalendar(), Sabre\VObject\VCardConverterTest\testAnniversary(), Sabre\VObject\BirthdayCalendarGeneratorTest\testArrayOfVcardObjectsWithValidBirthdays(), Sabre\VObject\Component\AvailableTest\testAvailableComponent(), Sabre\VObject\Component\VAvailabilityTest\testAvailableSubComponent(), Sabre\VObject\VCardConverterTest\testBDAYConversion(), Sabre\CalDAV\ICSExportPluginTest\testBeforeMethod(), Sabre\CalDAV\ICSExportPluginTest\testBeforeMethodNoVersion(), Sabre\VObject\Component\VCalendarTest\testBrokenEventExpand(), Sabre\CalDAV\Issue172Test\testBuiltInTimezoneName(), Sabre\CalDAV\PluginTest\testCalendarMultiGetReportExpand(), Sabre\CalDAV\PluginTest\testCalendarQueryReport(), Sabre\CalDAV\PluginTest\testCalendarQueryReport1Object(), Sabre\CalDAV\PluginTest\testCalendarQueryReportWindowsPhone(), Sabre\VObject\VCardConverterTest\testConvert21to40(), Sabre\VObject\VCardConverterTest\testConvert30to30(), Sabre\VObject\VCardConverterTest\testConvert30to40(), Sabre\VObject\VCardConverterTest\testConvert40to30(), Sabre\VObject\VCardConverterTest\testConvert40to40(), Sabre\VObject\VCardConverterTest\testConvertGroupCard(), Sabre\VObject\VCardConverterTest\testConvertIndividualCard(), Sabre\VObject\GoogleColonEscapingTest\testDecode(), Sabre\VObject\EmptyValueIssueTest\testDecodeValue(), Sabre\CalDAV\Schedule\IMipPluginTest\testDeliverCancel(), Sabre\CalDAV\Schedule\IMipPluginTest\testDeliverInsignificantRequest(), Sabre\CalDAV\Schedule\IMipPluginTest\testDeliverReply(), Sabre\CalDAV\Schedule\IMipPluginTest\testDeliverReplyNoMailto(), Sabre\CalDAV\Schedule\IMipPluginTest\testDeliverRequest(), Sabre\CalDAV\Schedule\DeliverNewEventTest\testDelivery(), Sabre\VObject\Recur\EventIterator\MaxInstancesTest\testExceedMaxRecurrences(), Sabre\VObject\TimeZoneUtilTest\testExchangeMap(), Sabre\VObject\Issue50Test\testExpand(), Sabre\VObject\Issue48Test\testExpand(), Sabre\VObject\Recur\EventIterator\MissingOverriddenTest\testExpand(), Sabre\VObject\Recur\ByMonthInDailyTest\testExpand(), Sabre\VObject\Recur\EventIterator\ExpandFloatingTimesTest\testExpand(), Sabre\VObject\Recur\EventIterator\Issue26Test\testExpand(), Sabre\VObject\Component\VCalendarTest\testExpand(), Sabre\VObject\Recur\EventIterator\IncorrectExpandTest\testExpand(), Sabre\VObject\Recur\EventIterator\HandleRDateExpandTest\testExpand(), Sabre\VObject\Recur\BySetPosHangTest\testExpand(), Sabre\CalDAV\ExpandEventsDoubleEventsTest\testExpand(), Sabre\CalDAV\ICSExportPluginTest\testExpand(), Sabre\VObject\Recur\EventIterator\ExpandFloatingTimesTest\testExpandWithReferenceTimezone(), Sabre\VObject\TimeZoneUtilTest\testFallBack(), Sabre\CalDAV\ICSExportPluginTest\testFilterComponentVEVENT(), Sabre\CalDAV\ICSExportPluginTest\testFilterComponentVTODO(), Sabre\CalDAV\ICSExportPluginTest\testFilterStartEnd(), Sabre\CalDAV\Issue166Test\testFlaw(), Sabre\VObject\Component\VCalendarTest\testGetBaseComponent(), Sabre\VObject\Component\VCalendarTest\testGetBaseComponentNoResult(), Sabre\VObject\Component\VCalendarTest\testGetBaseComponentWithFilter(), Sabre\VObject\Component\VCalendarTest\testGetBaseComponentWithFilterNoResult(), Sabre\VObject\Component\VCardTest\testGetByType(), Sabre\VObject\Component\VCard\DateAndOrTimeTest\testGetDateIncompleteFromVCard(), Sabre\VObject\Recur\EventIterator\FifthTuesdayProblemTest\testGetDTEnd(), Sabre\VObject\Component\VAvailabilityTest\testGetEffectiveStartDuration(), Sabre\VObject\Component\AvailableTest\testGetEffectiveStartEnd(), Sabre\VObject\Component\VAvailabilityTest\testGetEffectiveStartEnd(), Sabre\VObject\Component\AvailableTest\testGetEffectiveStartEndDuration(), Sabre\VObject\Component\VAvailabilityTest\testGetEffectiveStartEndUnbound(), Sabre\CalDAV\ICalendar\RecurTest\testGetJSONWithCount(), Sabre\CalDAV\ICalendar\RecurTest\testGetJSONWithUntil(), Sabre\VObject\Component\VTimeZoneTest\testGetTimeZone(), Sabre\VObject\Splitter\ICalendarTest\testICalendarImportEventWithoutUID(), Sabre\VObject\Splitter\ICalendarTest\testICalendarImportMultipleValidEvents(), Sabre\VObject\Splitter\ICalendarTest\testICalendarImportMultipleVTIMEZONESAndMultipleValidEvents(), Sabre\VObject\Splitter\ICalendarTest\testICalendarImportValidEvent(), Sabre\VObject\Splitter\ICalendarTest\testICalendarImportWithOutVTIMEZONES(), Sabre\VObject\Component\VAlarmTest\testInTimeRangeBuggy(), Sabre\VObject\Component\VFreeBusyTest\testIsFree(), Sabre\VObject\Component\VAvailabilityTest\testIsInTimeRangeOutside(), Sabre\VObject\Component\VAvailabilityTest\testIsInTimeRangeUnbound(), Sabre\CalDAV\Issue205Test\testIssue205(), Sabre\CalDAV\Issue172Test\testLibICalLocationName(), Sabre\VObject\TimeZoneUtilTest\testLjubljanaBug(), Sabre\VObject\Property\BooleanTest\testMimeDir(), Sabre\VObject\VCardConverterTest\testMultipleAnniversaries(), Sabre\VObject\VCardConverterTest\testNoLabel(), Sabre\VObject\FreeBusyGeneratorTest\testObject(), Sabre\CalDAV\Issue172Test\testOutlookTimezoneName(), Sabre\VObject\RecurrenceIterator\OverrideFirstEventTest\testOverrideFirstEvent(), Sabre\VObject\ICalendar\AttachParseTest\testParseAttach(), Sabre\VObject\EmClientTest\testParseTz(), Sabre\VObject\Component\VCardTest\testPreferredNoPref(), Sabre\VObject\Component\VCardTest\testPreferredNotFound(), Sabre\VObject\Component\VCardTest\testPreferredWith40Pref(), Sabre\VObject\Component\VCardTest\testPreferredWithPref(), Sabre\VObject\VCard21Test\testPropertyPadValueCount(), Sabre\VObject\VCard21Test\testPropertyWithNoName(), Sabre\VObject\Issue96Test\testRead(), Sabre\VObject\EmptyParameterTest\testRead(), Sabre\VObject\Issue153Test\testRead(), Sabre\VObject\Issue64Test\testRead(), Sabre\VObject\LineFoldingIssueTest\testRead(), Sabre\VObject\AttachIssueTest\testRead(), Sabre\VObject\IssueUndefinedIndexTest\testRead(), Sabre\VObject\ReaderTest\testReadBOM(), Sabre\VObject\ReaderTest\testReadBrokenInput(), Sabre\VObject\ReaderTest\testReadBrokenLine(), Sabre\VObject\ReaderTest\testReadComponent(), Sabre\VObject\ReaderTest\testReadComponentLineFold(), Sabre\VObject\ReaderTest\testReadComponentUnixNewLine(), Sabre\VObject\ReaderTest\testReadCorruptComponent(), Sabre\VObject\ReaderTest\testReadCorruptSubComponent(), Sabre\VObject\ReaderTest\testReadForgiving(), Sabre\VObject\ReaderTest\testReadIncompleteFile(), Sabre\VObject\ReaderTest\testReadMappedProperty(), Sabre\VObject\ReaderTest\testReadMappedPropertyGrouped(), Sabre\VObject\ReaderTest\testReadNestedComponent(), Sabre\VObject\ReaderTest\testReadProperty(), Sabre\VObject\ReaderTest\testReadProperty2Parameters(), Sabre\VObject\ReaderTest\testReadPropertyInComponent(), Sabre\VObject\ReaderTest\testReadPropertyNoName(), Sabre\VObject\ReaderTest\testReadPropertyParameter(), Sabre\VObject\ReaderTest\testReadPropertyParameterExtraColon(), Sabre\VObject\ReaderTest\testReadPropertyParameterNewLines(), Sabre\VObject\ReaderTest\testReadPropertyParameterQuoted(), Sabre\VObject\ReaderTest\testReadPropertyParameterQuotedColon(), Sabre\VObject\ReaderTest\testReadPropertyRepeatingNamelessGuessedParameter(), Sabre\VObject\ReaderTest\testReadPropertyRepeatingParameter(), Sabre\VObject\ReaderTest\testReadPropertyWithNewLine(), Sabre\VObject\Parser\QuotedPrintableTest\testReadQuotedPrintableCompatibilityMS(), Sabre\VObject\Parser\QuotedPrintableTest\testReadQuotedPrintableNewlineHard(), Sabre\VObject\Parser\QuotedPrintableTest\testReadQuotedPrintableNewlineSoft(), Sabre\VObject\Parser\QuotedPrintableTest\testReadQuotedPrintableSimple(), Sabre\VObject\Parser\QuotedPrintableTest\testReadQuotesPrintableCompoundValues(), Sabre\VObject\ReaderTest\testReadStream(), Sabre\VObject\ReaderTest\testReadWithInvalidLine(), Sabre\VObject\Recur\NoInstancesTest\testRecurrence(), Sabre\VObject\RecurrenceIterator\OverrideFirstEventTest\testRemoveFirstEvent(), Sabre\VObject\Component\VAvailabilityTest\testRFCxxxSection3_1_availabilityprop_dtend_duration(), Sabre\VObject\Component\VAvailabilityTest\testRFCxxxSection3_1_availabilityprop_optional_once(), Sabre\VObject\Component\VAvailabilityTest\testRFCxxxSection3_1_availabilityprop_required(), Sabre\VObject\Component\VAvailabilityTest\testRFCxxxSection3_1_available_dtend_duration(), Sabre\VObject\Component\VAvailabilityTest\testRFCxxxSection3_1_available_optional_once(), Sabre\VObject\Component\VAvailabilityTest\testRFCxxxSection3_1_availableprop_required(), Sabre\VObject\Component\VAvailabilityTest\testRFCxxxSection3_2(), Sabre\VObject\ITip\BrokerTimezoneInParseEventInfoWithoutMasterTest\testTimezoneInParseEventInfoWithoutMaster(), Sabre\CalDAV\CalendarQueryValidatorTest\testTopLevelFail(), Sabre\VObject\TimeZoneUtilTest\testUnknownExchangeId(), Sabre\VObject\VCardConverterTest\testUnknownSourceVCardVersion(), Sabre\VObject\VCardConverterTest\testUnknownTargetVCardVersion(), Sabre\CalDAV\CalendarQueryValidatorTest\testValid(), Sabre\VObject\Component\VTimeZoneTest\testValidate(), Sabre\VObject\Component\VCardTest\testValidate(), Sabre\VObject\Component\VJournalTest\testValidate(), Sabre\VObject\Component\VFreeBusyTest\testValidate(), Sabre\VObject\Component\VTodoTest\testValidate(), Sabre\VObject\Component\VJournalTest\testValidateBroken(), Sabre\VObject\Component\VCalendarTest\testValidateCorrect(), Sabre\VObject\Component\VCalendarTest\testValidateDoubleCalScale(), Sabre\VObject\Component\VCalendarTest\testValidateDoubleMethod(), Sabre\VObject\Component\VTodoTest\testValidateDUEbeforeDTSTART(), Sabre\VObject\Component\VTodoTest\testValidateDUEDTSTARTMisMatch(), Sabre\VObject\Component\VTodoTest\testValidateInvalid(), Sabre\VObject\Property\TextTest\testValidateMinimumPropValue(), Sabre\VObject\Component\VCalendarTest\testValidateNoProdId(), Sabre\VObject\Component\VCalendarTest\testValidateNoVersion(), Sabre\VObject\Component\VCalendarTest\testValidateOneMasterEvent(), Sabre\CalDAV\ICalendar\RecurTest\testValidateStripEmpties(), Sabre\CalDAV\ICalendar\RecurTest\testValidateStripNoFreq(), Sabre\VObject\Component\VCalendarTest\testValidateTwoMasterEvents(), Sabre\VObject\Component\VCalendarTest\testValidateWrongVersion(), Sabre\VObject\Component\VAvailabilityTest\testVAvailabilityComponent(), Sabre\VObject\TimeZoneUtilTest\testWeirdSystemVLICs(), Sabre\VObject\TimeZoneUtilTest\testWetherMicrosoftIsStillInsane(), Sabre\VObject\Issue36WorkAroundTest\testWorkaround(), Sabre\CalDAV\Backend\AbstractBackend\validateFilterForObject(), Sabre\CardDAV\Plugin\validateFilters(), Sabre\CalDAV\Plugin\validateICalendar(), and Sabre\CardDAV\Plugin\validateVCard().

42  {
43 
44  $parser = new Parser\MimeDir();
45  $parser->setCharset($charset);
46  $result = $parser->parse($data, $options);
47 
48  return $result;
49 
50  }
$result
$parser
Definition: BPMN2Parser.php:23
$data
Definition: bench.php:6
+ Here is the caller graph for this function:

◆ readJson()

static Sabre\VObject\Reader::readJson (   $data,
  $options = 0 
)
static

Parses a jCard or jCal object, and returns the top component.

The options argument is a bitfield. Pass any of the OPTIONS constant to alter the parsers' behaviour.

You can either a string, a readable stream, or an array for it's input. Specifying the array is useful if json_decode was already called on the input.

Parameters
string | resource | array$data
int$options
Returns
Document

Definition at line 67 of file Reader.php.

References $data, PHPMailer\PHPMailer\$options, $parser, and $result.

Referenced by Sabre\VObject\Parser\JsonTest\testParseStreamArg(), Sabre\CalDAV\Plugin\validateICalendar(), and Sabre\CardDAV\Plugin\validateVCard().

67  {
68 
69  $parser = new Parser\Json();
70  $result = $parser->parse($data, $options);
71 
72  return $result;
73 
74  }
$result
$parser
Definition: BPMN2Parser.php:23
$data
Definition: bench.php:6
+ Here is the caller graph for this function:

◆ readXML()

static Sabre\VObject\Reader::readXML (   $data,
  $options = 0 
)
static

Parses a xCard or xCal object, and returns the top component.

The options argument is a bitfield. Pass any of the OPTIONS constant to alter the parsers' behaviour.

You can either supply a string, or a readable stream for input.

Parameters
string | resource$data
int$options
Returns
Document

Definition at line 89 of file Reader.php.

References $data, PHPMailer\PHPMailer\$options, $parser, and $result.

Referenced by Sabre\VObject\Parser\XmlTest\assertXMLEqualsToMimeDir(), Sabre\VObject\ReaderTest\testReadXMLComponent(), Sabre\VObject\ReaderTest\testReadXMLStream(), and Sabre\VObject\Parser\XmlTest\testRFC6321Example2().

89  {
90 
91  $parser = new Parser\XML();
92  $result = $parser->parse($data, $options);
93 
94  return $result;
95 
96  }
$result
$parser
Definition: BPMN2Parser.php:23
$data
Definition: bench.php:6
+ Here is the caller graph for this function:

Field Documentation

◆ OPTION_FORGIVING

◆ OPTION_IGNORE_INVALID_LINES

const Sabre\VObject\Reader::OPTION_IGNORE_INVALID_LINES = 2

If this option is turned on, any lines we cannot parse will be ignored by the reader.

Definition at line 27 of file Reader.php.

Referenced by Sabre\VObject\ReaderTest\testReadWithInvalidLine().


The documentation for this class was generated from the following file: