Skip to content

Sabre VObject Reader

Evert Pot edited this page Sep 1, 2014 · 4 revisions

Sabre\VObject\Reader

iCalendar/vCard/jCal/jCard reader object.

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

  • Class name: Reader
  • Namespace: Sabre\VObject

Constants

OPTION_FORGIVING

const OPTION_FORGIVING = 1

OPTION_IGNORE_INVALID_LINES

const OPTION_IGNORE_INVALID_LINES = 2

Methods

read

\Sabre\VObject\Document Sabre\VObject\Reader::read(string|resource $data, integer $options)

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.

  • Visibility: public
  • This method is static.

Arguments

  • $data string|resource
  • $options integer

readJson

\Sabre\VObject\Node Sabre\VObject\Reader::readJson(string|resource|array $data, integer $options)

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.

  • Visibility: public
  • This method is static.

Arguments

  • $data string|resource|array
  • $options integer
Clone this wiki locally