PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 1.2.20
Booking for Appointments and Events Calendar – Amelia v1.2.20
2.4.4 2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / vendor / sabre / vobject / lib / Reader.php
ameliabooking / vendor / sabre / vobject / lib Last commit date
Component 1 year ago ITip 1 year ago Parser 1 year ago Property 1 year ago Recur 1 year ago Splitter 1 year ago TimezoneGuesser 1 year ago timezonedata 1 year ago BirthdayCalendarGenerator.php 1 year ago Cli.php 1 year ago Component.php 1 year ago DateTimeParser.php 1 year ago Document.php 1 year ago ElementList.php 1 year ago EofException.php 1 year ago FreeBusyData.php 1 year ago FreeBusyGenerator.php 1 year ago InvalidDataException.php 1 year ago Node.php 1 year ago PHPUnitAssertions.php 1 year ago Parameter.php 1 year ago ParseException.php 1 year ago Property.php 1 year ago Reader.php 1 year ago Settings.php 1 year ago StringUtil.php 1 year ago TimeZoneUtil.php 1 year ago UUIDUtil.php 1 year ago VCardConverter.php 1 year ago Version.php 1 year ago Writer.php 1 year ago
Reader.php
96 lines
1 <?php
2
3 namespace Sabre\VObject;
4
5 /**
6 * iCalendar/vCard/jCal/jCard/xCal/xCard reader object.
7 *
8 * This object provides a few (static) convenience methods to quickly access
9 * the parsers.
10 *
11 * @copyright Copyright (C) fruux GmbH (https://fruux.com/)
12 * @author Evert Pot (http://evertpot.com/)
13 * @license http://sabre.io/license/ Modified BSD License
14 */
15 class Reader
16 {
17 /**
18 * If this option is passed to the reader, it will be less strict about the
19 * validity of the lines.
20 */
21 const OPTION_FORGIVING = 1;
22
23 /**
24 * If this option is turned on, any lines we cannot parse will be ignored
25 * by the reader.
26 */
27 const OPTION_IGNORE_INVALID_LINES = 2;
28
29 /**
30 * Parses a vCard or iCalendar object, and returns the top component.
31 *
32 * The options argument is a bitfield. Pass any of the OPTIONS constant to
33 * alter the parsers' behaviour.
34 *
35 * You can either supply a string, or a readable stream for input.
36 *
37 * @param string|resource $data
38 * @param int $options
39 * @param string $charset
40 *
41 * @return Document
42 */
43 public static function read($data, $options = 0, $charset = 'UTF-8')
44 {
45 $parser = new Parser\MimeDir();
46 $parser->setCharset($charset);
47 $result = $parser->parse($data, $options);
48
49 return $result;
50 }
51
52 /**
53 * Parses a jCard or jCal object, and returns the top component.
54 *
55 * The options argument is a bitfield. Pass any of the OPTIONS constant to
56 * alter the parsers' behaviour.
57 *
58 * You can either a string, a readable stream, or an array for its input.
59 * Specifying the array is useful if json_decode was already called on the
60 * input.
61 *
62 * @param string|resource|array $data
63 * @param int $options
64 *
65 * @return Document
66 */
67 public 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 /**
76 * Parses a xCard or xCal object, and returns the top component.
77 *
78 * The options argument is a bitfield. Pass any of the OPTIONS constant to
79 * alter the parsers' behaviour.
80 *
81 * You can either supply a string, or a readable stream for input.
82 *
83 * @param string|resource $data
84 * @param int $options
85 *
86 * @return Document
87 */
88 public static function readXML($data, $options = 0)
89 {
90 $parser = new Parser\XML();
91 $result = $parser->parse($data, $options);
92
93 return $result;
94 }
95 }
96