ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Public Member Functions | |
initialize (DAV\Server $server) | |
Initializes the plugin. More... | |
getFeatures () | |
Returns a list of supported features. More... | |
getSupportedReportSet ($uri) | |
Returns a list of reports this plugin supports. More... | |
propFindEarly (DAV\PropFind $propFind, DAV\INode $node) | |
Adds all CardDAV-specific properties. More... | |
report ($reportName, $dom, $path) | |
This functions handles REPORT requests specific to CardDAV. More... | |
addressbookMultiGetReport ($report) | |
This function handles the addressbook-multiget REPORT. More... | |
beforeWriteContent ($path, DAV\IFile $node, &$data, &$modified) | |
This method is triggered before a file gets updated with new content. More... | |
beforeCreateFile ($path, &$data, DAV\ICollection $parentNode, &$modified) | |
This method is triggered before a new file is created. More... | |
validateFilters ($vcardData, array $filters, $test) | |
Validates if a vcard makes it throught a list of filters. More... | |
propFindLate (DAV\PropFind $propFind, DAV\INode $node) | |
This event is triggered when fetching properties. More... | |
htmlActionsPanel (DAV\INode $node, &$output) | |
This method is used to generate HTML output for the Sabre. More... | |
httpAfterGet (RequestInterface $request, ResponseInterface $response) | |
This event is triggered after GET requests. More... | |
getPluginName () | |
Returns a plugin name. More... | |
getPluginInfo () | |
Returns a bunch of meta-data about the plugin. More... | |
Public Member Functions inherited from Sabre\DAV\ServerPlugin | |
initialize (Server $server) | |
This initializes the plugin. More... | |
getFeatures () | |
This method should return a list of server-features. More... | |
getHTTPMethods ($path) | |
Use this method to tell the server this plugin defines additional HTTP methods. More... | |
getPluginName () | |
Returns a plugin name. More... | |
getSupportedReportSet ($uri) | |
Returns a list of reports this plugin supports. More... | |
getPluginInfo () | |
Returns a bunch of meta-data about the plugin. More... | |
Data Fields | |
const | ADDRESSBOOK_ROOT = 'addressbooks' |
Url to the addressbooks. More... | |
const | NS_CARDDAV = 'urn:ietf:params:xml:ns:carddav' |
xml namespace for CardDAV elements More... | |
$directories = [] | |
Protected Member Functions | |
getAddressbookHomeForPrincipal ($principal) | |
Returns the addressbook home for a given principal. More... | |
validateVCard (&$data, &$modified) | |
Checks if the submitted iCalendar data is in fact, valid. More... | |
addressbookQueryReport ($report) | |
This function handles the addressbook-query REPORT. More... | |
validateParamFilters (array $vProperties, array $filters, $test) | |
Validates if a param-filter can be applied to a specific property. More... | |
validateTextMatches (array $texts, array $filters, $test) | |
Validates if a text-filter can be applied to a specific property. More... | |
negotiateVCard ($input, &$mimeType=null) | |
This helper function performs the content-type negotiation for vcards. More... | |
convertVCard ($data, $target, array $propertiesFilter=null) | |
Converts a vcard blob to a different version, or jcard. More... | |
Protected Attributes | |
$server | |
$maxResourceSize = 10000000 | |
The default PDO storage uses a MySQL MEDIUMBLOB for iCalendar data, which can hold up to 2^24 = 16777216 bytes. More... | |
CardDAV plugin.
The CardDAV plugin adds CardDAV functionality to the WebDAV server
Definition at line 23 of file Plugin.php.
Sabre\CardDAV\Plugin::addressbookMultiGetReport | ( | $report | ) |
This function handles the addressbook-multiget REPORT.
This report is used by the client to fetch the content of a series of urls. Effectively avoiding a lot of redundant requests.
Xml\Request\AddressBookMultiGetReport | $report |
Definition at line 236 of file Plugin.php.
References $contentType, $paths, $version, Sabre\CardDAV\Plugin\convertVCard(), and Sabre\CardDAV\Plugin\negotiateVCard().
Referenced by Sabre\CardDAV\Plugin\report().
|
protected |
This function handles the addressbook-query REPORT.
This report is used by the client to filter an addressbook based on a complex query.
Xml\Request\AddressBookQueryReport | $report |
Definition at line 430 of file Plugin.php.
References $contentType, $result, Sabre\CardDAV\Plugin\convertVCard(), Sabre\CardDAV\Plugin\negotiateVCard(), and Sabre\CardDAV\Plugin\validateFilters().
Sabre\CardDAV\Plugin::beforeCreateFile | ( | $path, | |
& | $data, | ||
DAV\ICollection | $parentNode, | ||
& | $modified | ||
) |
This method is triggered before a new file is created.
This plugin uses this method to ensure that Card nodes receive valid vcard data.
string | $path | |
resource | $data | |
DAV\ICollection | $parentNode | |
bool | $modified | Should be set to true, if this event handler changed &$data. |
Definition at line 311 of file Plugin.php.
References $data, and Sabre\CardDAV\Plugin\validateVCard().
Sabre\CardDAV\Plugin::beforeWriteContent | ( | $path, | |
DAV\IFile | $node, | ||
& | $data, | ||
& | $modified | ||
) |
This method is triggered before a file gets updated with new content.
This plugin uses this method to ensure that Card nodes receive valid vcard data.
string | $path | |
DAV\IFile | $node | |
resource | $data | |
bool | $modified | Should be set to true, if this event handler changed &$data. |
Definition at line 289 of file Plugin.php.
References $data, and Sabre\CardDAV\Plugin\validateVCard().
|
protected |
Converts a vcard blob to a different version, or jcard.
string | resource | $data | |
string | $target | |
array | $propertiesFilter |
Definition at line 852 of file Plugin.php.
References $data, $input, $key, $keys, Sabre\VObject\$output, $target, Sabre\VObject\Reader\read(), Sabre\VObject\Document\VCARD30, and Sabre\VObject\Document\VCARD40.
Referenced by Sabre\CardDAV\Plugin\addressbookMultiGetReport(), Sabre\CardDAV\Plugin\addressbookQueryReport(), and Sabre\CardDAV\Plugin\httpAfterGet().
|
protected |
Returns the addressbook home for a given principal.
string | $principal |
Definition at line 219 of file Plugin.php.
References Sabre\HTTP\URLUtil\splitPath().
Sabre\CardDAV\Plugin::getFeatures | ( | ) |
Returns a list of supported features.
This is used in the DAV: header in the OPTIONS and PROPFIND requests.
Definition at line 102 of file Plugin.php.
Sabre\CardDAV\Plugin::getPluginInfo | ( | ) |
Returns a bunch of meta-data about the plugin.
Providing this information is optional, and is mainly displayed by the Browser plugin.
The description key in the returned array may contain html and will not be sanitized.
Definition at line 930 of file Plugin.php.
References Sabre\CardDAV\Plugin\getPluginName().
Sabre\CardDAV\Plugin::getPluginName | ( | ) |
Returns a plugin name.
Using this name other plugins will be able to access other plugins using DAV::getPlugin
Definition at line 913 of file Plugin.php.
Referenced by Sabre\CardDAV\Plugin\getPluginInfo().
Sabre\CardDAV\Plugin::getSupportedReportSet | ( | $uri | ) |
Returns a list of reports this plugin supports.
This will be used in the {DAV:}supported-report-set property. Note that you still need to subscribe to the 'report' event to actually implement them
string | $uri |
Definition at line 118 of file Plugin.php.
Sabre\CardDAV\Plugin::htmlActionsPanel | ( | DAV\INode | $node, |
& | $output | ||
) |
This method is used to generate HTML output for the Sabre.
This allows us to generate an interface users can use to create new addressbooks.
DAV\INode | $node | |
string | $output |
Definition at line 744 of file Plugin.php.
References Sabre\VObject\$output.
Sabre\CardDAV\Plugin::httpAfterGet | ( | RequestInterface | $request, |
ResponseInterface | $response | ||
) |
This event is triggered after GET requests.
This is used to transform data into jCal, if this was requested.
RequestInterface | $request | |
ResponseInterface | $response |
Definition at line 772 of file Plugin.php.
References $target, Sabre\CardDAV\Plugin\convertVCard(), Sabre\HTTP\MessageInterface\getBody(), Sabre\HTTP\MessageInterface\getHeader(), Sabre\CardDAV\Plugin\negotiateVCard(), Sabre\HTTP\MessageInterface\setBody(), and Sabre\HTTP\MessageInterface\setHeader().
Sabre\CardDAV\Plugin::initialize | ( | DAV\Server | $server | ) |
Initializes the plugin.
DAV\Server | $server |
Definition at line 63 of file Plugin.php.
References Sabre\CardDAV\Plugin\$server.
|
protected |
This helper function performs the content-type negotiation for vcards.
It will return one of the following strings:
It defaults to vcard3.
string | $input | |
string | $mimeType |
Definition at line 805 of file Plugin.php.
References $input, $result, and Sabre\HTTP\Util\negotiate().
Referenced by Sabre\CardDAV\Plugin\addressbookMultiGetReport(), Sabre\CardDAV\Plugin\addressbookQueryReport(), and Sabre\CardDAV\Plugin\httpAfterGet().
Sabre\CardDAV\Plugin::propFindEarly | ( | DAV\PropFind | $propFind, |
DAV\INode | $node | ||
) |
Adds all CardDAV-specific properties.
DAV\PropFind | $propFind | |
DAV\INode | $node |
Definition at line 139 of file Plugin.php.
References $path.
Sabre\CardDAV\Plugin::propFindLate | ( | DAV\PropFind | $propFind, |
DAV\INode | $node | ||
) |
This event is triggered when fetching properties.
This event is scheduled late in the process, after most work for propfind has been done.
DAV\PropFind | $propFind | |
DAV\INode | $node |
Definition at line 718 of file Plugin.php.
References $contentType.
Sabre\CardDAV\Plugin::report | ( | $reportName, | |
$dom, | |||
$path | |||
) |
This functions handles REPORT requests specific to CardDAV.
string | $reportName | |
\DOMNode | $dom | |
mixed | $path |
Definition at line 194 of file Plugin.php.
References Sabre\CardDAV\Plugin\addressbookMultiGetReport().
Sabre\CardDAV\Plugin::validateFilters | ( | $vcardData, | |
array | $filters, | ||
$test | |||
) |
Validates if a vcard makes it throught a list of filters.
string | $vcardData | |
array | $filters | |
string | $test | anyof or allof (which means OR or AND) |
Definition at line 519 of file Plugin.php.
References $results, $success, $test, Sabre\VObject\Reader\read(), Sabre\CardDAV\Plugin\validateParamFilters(), and Sabre\CardDAV\Plugin\validateTextMatches().
Referenced by Sabre\CardDAV\Plugin\addressbookQueryReport().
|
protected |
Validates if a param-filter can be applied to a specific property.
array | $vProperties | |
array | $filters | |
string | $test |
Definition at line 610 of file Plugin.php.
References $success, $test, and Sabre\DAV\StringUtil\textMatch().
Referenced by Sabre\CardDAV\Plugin\validateFilters().
|
protected |
Validates if a text-filter can be applied to a specific property.
array | $texts | |
array | $filters | |
string | $test |
Definition at line 675 of file Plugin.php.
References $success, $test, and Sabre\DAV\StringUtil\textMatch().
Referenced by Sabre\CardDAV\Plugin\validateFilters().
|
protected |
Checks if the submitted iCalendar data is in fact, valid.
An exception is thrown if it's not.
resource | string | $data | |
bool | $modified | Should be set to true, if this event handler changed &$data. |
Definition at line 330 of file Plugin.php.
References $data, $message, $messages, PHPMailer\PHPMailer\$options, $vobj, Sabre\VObject\Node\PROFILE_CARDDAV, Sabre\VObject\Reader\read(), Sabre\VObject\Reader\readJson(), and Sabre\VObject\Node\REPAIR.
Referenced by Sabre\CardDAV\Plugin\beforeCreateFile(), and Sabre\CardDAV\Plugin\beforeWriteContent().
Sabre\CardDAV\Plugin::$directories = [] |
Definition at line 41 of file Plugin.php.
|
protected |
The default PDO storage uses a MySQL MEDIUMBLOB for iCalendar data, which can hold up to 2^24 = 16777216 bytes.
This is plenty. We're capping it to 10M here.
Definition at line 55 of file Plugin.php.
|
protected |
Definition at line 48 of file Plugin.php.
Referenced by Sabre\CardDAV\Plugin\initialize().
const Sabre\CardDAV\Plugin::ADDRESSBOOK_ROOT = 'addressbooks' |
Url to the addressbooks.
Definition at line 28 of file Plugin.php.
Referenced by Sabre\CardDAV\AddressBookRoot\getName().
const Sabre\CardDAV\Plugin::NS_CARDDAV = 'urn:ietf:params:xml:ns:carddav' |
xml namespace for CardDAV elements
Definition at line 33 of file Plugin.php.
Referenced by Sabre\CardDAV\Backend\PDO\createAddressBook(), Sabre\CardDAV\VCFExportPlugin\generateVCF(), Sabre\CardDAV\Backend\PDO\getAddressBooksForUser(), Sabre\CardDAV\VCFExportPlugin\httpGet(), Sabre\CardDAV\PluginTest\testAddressBookHomeSet(), Sabre\CardDAV\PluginTest\testAddressbookPluginProperties(), Sabre\CardDAV\PluginTest\testConstruct(), Sabre\CardDAV\Backend\AbstractPDOTest\testCreateAddressBookSuccess(), Sabre\CardDAV\AddressBookHomeTest\testCreateExtendedCollection(), Sabre\CardDAV\PluginTest\testDirectoryGateway(), Sabre\CardDAV\Backend\AbstractPDOTest\testGetAddressBooksForUser(), Sabre\CardDAV\IDirectoryTest\testResourceType(), Sabre\CardDAV\Xml\Property\SupportedCollationSetTest\testSerialize(), Sabre\CardDAV\Xml\Property\SupportedAddressDataTest\testSerialize(), Sabre\CardDAV\PluginTest\testSupportedReportSet(), Sabre\CardDAV\Backend\AbstractPDOTest\testUpdateAddressBookInvalidProp(), Sabre\CardDAV\Backend\AbstractPDOTest\testUpdateAddressBookNoProps(), Sabre\CardDAV\Backend\AbstractPDOTest\testUpdateAddressBookSuccess(), Sabre\CardDAV\Backend\PDO\updateAddressBook(), Sabre\CardDAV\Xml\Filter\PropFilter\xmlDeserialize(), Sabre\CardDAV\Xml\Filter\ParamFilter\xmlDeserialize(), Sabre\CardDAV\Xml\Request\AddressBookMultiGetReport\xmlDeserialize(), Sabre\CardDAV\Xml\Request\AddressBookQueryReport\xmlDeserialize(), and Sabre\CardDAV\Xml\Property\SupportedAddressData\xmlSerialize().