ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Reader.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Sabre\VObject;
4 
15 class Reader {
16 
21  const OPTION_FORGIVING = 1;
22 
28 
42  static function read($data, $options = 0, $charset = 'UTF-8') {
43 
44  $parser = new Parser\MimeDir();
45  $parser->setCharset($charset);
46  $result = $parser->parse($data, $options);
47 
48  return $result;
49 
50  }
51 
67  static function readJson($data, $options = 0) {
68 
69  $parser = new Parser\Json();
70  $result = $parser->parse($data, $options);
71 
72  return $result;
73 
74  }
75 
89  static function readXML($data, $options = 0) {
90 
91  $parser = new Parser\XML();
92  $result = $parser->parse($data, $options);
93 
94  return $result;
95 
96  }
97 
98 }
$result
Json Parser.
Definition: Json.php:19
const OPTION_IGNORE_INVALID_LINES
If this option is turned on, any lines we cannot parse will be ignored by the reader.
Definition: Reader.php:27
static readXML($data, $options=0)
Parses a xCard or xCal object, and returns the top component.
Definition: Reader.php:89
MimeDir parser.
Definition: MimeDir.php:25
iCalendar/vCard/jCal/jCard/xCal/xCard reader object.
Definition: Reader.php:15
const OPTION_FORGIVING
If this option is passed to the reader, it will be less strict about the validity of the lines...
Definition: Reader.php:21
static readJson($data, $options=0)
Parses a jCard or jCal object, and returns the top component.
Definition: Reader.php:67
XML Parser.
Definition: XML.php:21
$parser
Definition: BPMN2Parser.php:23
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
Definition: Reader.php:42
$data
Definition: bench.php:6