ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Public Member Functions | |
__construct () | |
Creates a new document. More... | |
getDocumentType () | |
Returns the current document type. More... | |
create ($name) | |
Creates a new component or property. More... | |
createComponent ($name, array $children=null, $defaults=true) | |
Creates a new component. More... | |
createProperty ($name, $value=null, array $parameters=null, $valueType=null) | |
Factory method for creating new properties. More... | |
getClassNameForPropertyValue ($valueParam) | |
This method returns a full class-name for a value parameter. More... | |
getClassNameForPropertyName ($propertyName) | |
Returns the default class for a property name. More... | |
Public Member Functions inherited from Sabre\VObject\Component | |
__construct (Document $root, $name, array $children=[], $defaults=true) | |
Creates a new component. More... | |
add () | |
Adds a new property or component, and returns the new item. More... | |
remove ($item) | |
This method removes a component or property from this component. More... | |
children () | |
Returns a flat list of all the properties and components in this component. More... | |
getComponents () | |
This method only returns a list of sub-components. More... | |
select ($name) | |
Returns an array with elements that match the specified name. More... | |
serialize () | |
Turns the object back into a serialized blob. More... | |
jsonSerialize () | |
This method returns an array, with the representation as it should be encoded in JSON. More... | |
xmlSerialize (Xml\Writer $writer) | |
This method serializes the data into XML. More... | |
__isset ($name) | |
This method checks if a sub-element with the specified name exists. More... | |
__set ($name, $value) | |
Using the setter method you can add properties or subcomponents. More... | |
__unset ($name) | |
Removes all properties and components within this component with the specified name. More... | |
__clone () | |
This method is automatically called when the object is cloned. More... | |
getValidationRules () | |
validate ($options=0) | |
Validates the node for correctness. More... | |
destroy () | |
Call this method on a document if you're done using it. More... | |
Public Member Functions inherited from Sabre\VObject\Node | |
serialize () | |
Serializes the node into a mimedir format. More... | |
jsonSerialize () | |
This method returns an array, with the representation as it should be encoded in JSON. More... | |
xmlSerialize (Xml\Writer $writer) | |
This method serializes the data into XML. More... | |
destroy () | |
Call this method on a document if you're done using it. More... | |
getIterator () | |
Returns the iterator for this object. More... | |
setIterator (ElementList $iterator) | |
Sets the overridden iterator. More... | |
validate ($options=0) | |
Validates the node for correctness. More... | |
count () | |
Returns the number of elements. More... | |
offsetExists ($offset) | |
Checks if an item exists through ArrayAccess. More... | |
offsetGet ($offset) | |
Gets an item through ArrayAccess. More... | |
offsetSet ($offset, $value) | |
Sets an item through ArrayAccess. More... | |
offsetUnset ($offset) | |
Sets an item through ArrayAccess. More... | |
Public Member Functions inherited from Sabre\Xml\XmlSerializable | |
xmlSerialize (Writer $writer) | |
The xmlSerialize method is called during xml writing. More... | |
Data Fields | |
const | UNKNOWN = 1 |
Unknown document type. More... | |
const | VCALENDAR10 = 2 |
vCalendar 1.0. More... | |
const | ICALENDAR20 = 3 |
iCalendar 2.0. More... | |
const | VCARD21 = 4 |
vCard 2.1. More... | |
const | VCARD30 = 5 |
vCard 3.0. More... | |
const | VCARD40 = 6 |
vCard 4.0. More... | |
Data Fields inherited from Sabre\VObject\Component | |
$name | |
Data Fields inherited from Sabre\VObject\Node | |
const | REPAIR = 1 |
The following constants are used by the validate() method. More... | |
const | PROFILE_CARDDAV = 2 |
If this option is set, the validator will operate on the vcards on the assumption that the vcards need to be valid for CardDAV. More... | |
const | PROFILE_CALDAV = 4 |
If this option is set, the validator will operate on iCalendar objects on the assumption that the vcards need to be valid for CalDAV. More... | |
$parent | |
Static Public Attributes | |
static | $defaultName |
static | $propertyMap = [] |
static | $componentMap = [] |
static | $valueMap = [] |
Additional Inherited Members | |
Protected Member Functions inherited from Sabre\VObject\Component | |
getDefaults () | |
This method should return a list of default property values. More... | |
Protected Attributes inherited from Sabre\VObject\Component | |
$children = [] | |
Protected Attributes inherited from Sabre\VObject\Node | |
$iterator = null | |
$root | |
A document is just like a component, except that it's also the top level element.
Both a VCALENDAR and a VCARD are considered documents.
This class also provides a registry for document types.
Definition at line 19 of file Document.php.
Sabre\VObject\Document::__construct | ( | ) |
Creates a new document.
We're changing the default behavior slightly here. First, we don't want to have to specify a name (we already know it), and we want to allow children to be specified in the first argument.
But, the default behavior also works.
So the two sigs:
new Document(array $children = [], $defaults = true); new Document(string $name, array $children = [], $defaults = true)
Definition at line 97 of file Document.php.
References Sabre\VObject\Node\count().
Sabre\VObject\Document::create | ( | $name | ) |
Creates a new component or property.
If it's a known component, we will automatically call createComponent. otherwise, we'll assume it's a property and call createProperty instead.
string | $name | |
string | $arg1,... | Unlimited number of args |
Definition at line 132 of file Document.php.
References Sabre\VObject\Component\$name.
Sabre\VObject\Document::createComponent | ( | $name, | |
array | $children = null , |
||
$defaults = true |
|||
) |
Creates a new component.
This method automatically searches for the correct component class, based on its name.
You can specify the children either in key=>value syntax, in which case properties will automatically be created, or you can just pass a list of Component and Property object.
By default, a set of sensible values will be added to the component. For an iCalendar object, this may be something like CALSCALE:GREGORIAN. To ensure that this does not happen, set $defaults to false.
string | $name | |
array | $children | |
bool | $defaults |
Definition at line 166 of file Document.php.
References Sabre\VObject\Component\$children, and Sabre\VObject\Component\$name.
Sabre\VObject\Document::createProperty | ( | $name, | |
$value = null , |
|||
array | $parameters = null , |
||
$valueType = null |
|||
) |
Factory method for creating new properties.
This method automatically searches for the correct property class, based on its name.
You can specify the parameters either in key=>value syntax, in which case parameters will automatically be created, or you can just pass a list of Parameter objects.
string | $name | |
mixed | $value | |
array | $parameters | |
string | $valueType | Force a specific valuetype, such as URI or TEXT |
Definition at line 196 of file Document.php.
References $i, Sabre\VObject\Component\$name, Sabre\VObject\Document\getClassNameForPropertyName(), and Sabre\VObject\Document\getClassNameForPropertyValue().
Sabre\VObject\Document::getClassNameForPropertyName | ( | $propertyName | ) |
Returns the default class for a property name.
string | $propertyName |
Definition at line 260 of file Document.php.
Referenced by Sabre\VObject\Document\createProperty().
Sabre\VObject\Document::getClassNameForPropertyValue | ( | $valueParam | ) |
This method returns a full class-name for a value parameter.
For instance, DTSTART may have VALUE=DATE. In that case we will look in our valueMap table and return the appropriate class name.
This method returns null if we don't have a specialized class.
string | $valueParam |
Definition at line 244 of file Document.php.
Referenced by Sabre\VObject\Document\createProperty().
Sabre\VObject\Document::getDocumentType | ( | ) |
|
static |
Definition at line 72 of file Document.php.
|
static |
Definition at line 58 of file Document.php.
|
static |
Definition at line 65 of file Document.php.
|
static |
Definition at line 79 of file Document.php.
const Sabre\VObject\Document::ICALENDAR20 = 3 |
iCalendar 2.0.
Definition at line 34 of file Document.php.
Referenced by Sabre\VObject\Component\VCalendarTest\testGetDocumentType(), and Sabre\VObject\Property\validate().
const Sabre\VObject\Document::UNKNOWN = 1 |
Unknown document type.
Definition at line 24 of file Document.php.
Referenced by Sabre\VObject\DocumentTest\testGetDocumentType(), and Sabre\VObject\Component\VCardTest\testGetDocumentType().
const Sabre\VObject\Document::VCALENDAR10 = 2 |
vCalendar 1.0.
Definition at line 29 of file Document.php.
const Sabre\VObject\Document::VCARD21 = 4 |
vCard 2.1.
Definition at line 39 of file Document.php.
Referenced by Sabre\VObject\VCardConverter\convert(), Sabre\VObject\Cli\convert(), Sabre\VObject\Parser\MimeDir\readProperty(), Sabre\VObject\Property\Text\serialize(), Sabre\VObject\Parameter\serialize(), Sabre\VObject\Component\VCardTest\testGetDocumentType(), Sabre\VObject\VCardConverterTest\testUnknownTargetVCardVersion(), and Sabre\VObject\Property\validate().
const Sabre\VObject\Document::VCARD30 = 5 |
vCard 3.0.
Definition at line 44 of file Document.php.
Referenced by Sabre\VObject\VCardConverter\convert(), Sabre\VObject\Cli\convert(), Sabre\VObject\VCardConverter\convertProperty(), Sabre\CardDAV\Plugin\convertVCard(), Sabre\VObject\VCardConverterTest\testAnniversary(), Sabre\VObject\VCardConverterTest\testBDAYConversion(), Sabre\VObject\VCardConverterTest\testConvert30to30(), Sabre\VObject\VCardConverterTest\testConvert40to30(), Sabre\VObject\VCardConverterTest\testConvertGroupCard(), Sabre\VObject\VCardConverterTest\testConvertIndividualCard(), Sabre\VObject\Component\VCardTest\testGetDocumentType(), Sabre\VObject\VCardConverterTest\testMultipleAnniversaries(), Sabre\VObject\EmptyParameterTest\testRead(), Sabre\VObject\Issue64Test\testRead(), and Sabre\VObject\Property\validate().
const Sabre\VObject\Document::VCARD40 = 6 |
vCard 4.0.
Definition at line 49 of file Document.php.
Referenced by Sabre\VObject\VCardConverter\convert(), Sabre\VObject\Cli\convert(), Sabre\VObject\VCardConverter\convertProperty(), Sabre\CardDAV\Plugin\convertVCard(), Sabre\VObject\BirthdayCalendarGenerator\getResult(), Sabre\VObject\VCardConverterTest\testAnniversary(), Sabre\VObject\VCardConverterTest\testBDAYConversion(), Sabre\VObject\VCardConverterTest\testConvert21to40(), Sabre\VObject\VCardConverterTest\testConvert30to40(), Sabre\VObject\VCardConverterTest\testConvert40to40(), Sabre\VObject\VCardConverterTest\testConvertGroupCard(), Sabre\VObject\VCardConverterTest\testConvertIndividualCard(), Sabre\VObject\Component\VCardTest\testGetDocumentType(), Sabre\VObject\VCardConverterTest\testMultipleAnniversaries(), Sabre\VObject\VCardConverterTest\testNoLabel(), Sabre\VObject\VCardConverterTest\testUnknownSourceVCardVersion(), and Sabre\VObject\Property\validate().