XML
XML Parser.
This parser parses both the xCal and xCard formats.
- Full name:
\Sabre\VObject\Parser\XML
- Parent class:
\Sabre\VObject\Parser\Parser
Constants
Constant | Visibility | Type | Value |
---|---|---|---|
XCAL_NAMESPACE |
public | 'urn:ietf:params:xml:ns:icalendar-2.0' | |
XCARD_NAMESPACE |
public | 'urn:ietf:params:xml:ns:vcard-4.0' |
Properties
input
The input data.
pointer
A pointer/reference to the input.
root
Document, root component.
Methods
__construct
Creates the parser.
Optionally, it's possible to parse the input stream here.
Parameters:
Parameter | Type | Description |
---|---|---|
$input |
mixed | |
$options |
int | any parser options (OPTION constants) |
parse
Parse xCal or xCard.
Parameters:
Parameter | Type | Description |
---|---|---|
$input |
resource|string | |
$options |
int |
Throws:
parseVCalendarComponents
Parse a xCalendar component.
Parameters:
Parameter | Type | Description |
---|---|---|
$parentComponent |
\Sabre\VObject\Component |
parseVCardComponents
Parse a xCard component.
Parameters:
Parameter | Type | Description |
---|---|---|
$parentComponent |
\Sabre\VObject\Component |
parseProperties
Parse xCalendar and xCard properties.
protected parseProperties(\Sabre\VObject\Component $parentComponent, string $propertyNamePrefix = ''): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$parentComponent |
\Sabre\VObject\Component | |
$propertyNamePrefix |
string |
parseComponent
Parse a component.
Parameters:
Parameter | Type | Description |
---|---|---|
$parentComponent |
\Sabre\VObject\Component |
createProperty
Create a property.
protected createProperty(\Sabre\VObject\Component $parentComponent, string $name, array $parameters, string $type, mixed $value): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$parentComponent |
\Sabre\VObject\Component | |
$name |
string | |
$parameters |
array | |
$type |
string | |
$value |
mixed |
setInput
Sets the input data.
Parameters:
Parameter | Type | Description |
---|---|---|
$input |
resource|string |
getTagName
Get tag name from a Clark notation.
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$clarkedTagName |
string |
Inherited methods
__construct
Creates the parser.
Optionally, it's possible to parse the input stream here.
Parameters:
Parameter | Type | Description |
---|---|---|
$input |
mixed | |
$options |
int | any parser options (OPTION constants) |
parse
This method starts the parsing process.
If the input was not supplied during construction, it's possible to pass it here instead.
If either input or options are not supplied, the defaults will be used.
- This method is abstract.
Parameters:
Parameter | Type | Description |
---|---|---|
$input |
mixed | |
$options |
int |
setInput
Sets the input data.
- This method is abstract.
Parameters:
Parameter | Type | Description |
---|---|---|
$input |
mixed |
Automatically generated on 2025-03-18