aboutsummaryrefslogtreecommitdiffstats
path: root/3rdparty/Sabre/DAV/Property/SupportedReportSet.php
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/Sabre/DAV/Property/SupportedReportSet.php')
-rwxr-xr-x[-rw-r--r--]3rdparty/Sabre/DAV/Property/SupportedReportSet.php39
1 files changed, 19 insertions, 20 deletions
diff --git a/3rdparty/Sabre/DAV/Property/SupportedReportSet.php b/3rdparty/Sabre/DAV/Property/SupportedReportSet.php
index acd9219c0f7..e62699f3b5a 100644..100755
--- a/3rdparty/Sabre/DAV/Property/SupportedReportSet.php
+++ b/3rdparty/Sabre/DAV/Property/SupportedReportSet.php
@@ -5,18 +5,18 @@
*
* This property is defined in RFC3253, but since it's
* so common in other webdav-related specs, it is part of the core server.
- *
+ *
* @package Sabre
* @subpackage DAV
- * @copyright Copyright (C) 2007-2011 Rooftop Solutions. All rights reserved.
- * @author Evert Pot (http://www.rooftopsolutions.nl/)
+ * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
+ * @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
*/
class Sabre_DAV_Property_SupportedReportSet extends Sabre_DAV_Property {
/**
- * List of reports
- *
+ * List of reports
+ *
* @var array
*/
protected $reports = array();
@@ -28,13 +28,12 @@ class Sabre_DAV_Property_SupportedReportSet extends Sabre_DAV_Property {
* should be valid report-types in clark-notation.
*
* Either a string or an array of strings must be passed.
- *
- * @param mixed $reports
- * @return void
+ *
+ * @param mixed $reports
*/
public function __construct($reports = null) {
- if (!is_null($reports))
+ if (!is_null($reports))
$this->addReport($reports);
}
@@ -44,8 +43,8 @@ class Sabre_DAV_Property_SupportedReportSet extends Sabre_DAV_Property {
*
* The report must be a string in clark-notation.
* Multiple reports can be specified as an array.
- *
- * @param mixed $report
+ *
+ * @param mixed $report
* @return void
*/
public function addReport($report) {
@@ -54,7 +53,7 @@ class Sabre_DAV_Property_SupportedReportSet extends Sabre_DAV_Property {
foreach($report as $r) {
- if (!preg_match('/^{([^}]*)}(.*)$/',$r))
+ if (!preg_match('/^{([^}]*)}(.*)$/',$r))
throw new Sabre_DAV_Exception('Reportname must be in clark-notation');
$this->reports[] = $r;
@@ -65,8 +64,8 @@ class Sabre_DAV_Property_SupportedReportSet extends Sabre_DAV_Property {
/**
* Returns the list of supported reports
- *
- * @return array
+ *
+ * @return array
*/
public function getValue() {
@@ -75,16 +74,16 @@ class Sabre_DAV_Property_SupportedReportSet extends Sabre_DAV_Property {
}
/**
- * Serializes the node
+ * Serializes the node
*
* @param Sabre_DAV_Server $server
- * @param DOMElement $prop
+ * @param DOMElement $prop
* @return void
*/
- public function serialize(Sabre_DAV_Server $server,DOMElement $prop) {
+ public function serialize(Sabre_DAV_Server $server, DOMElement $prop) {
foreach($this->reports as $reportName) {
-
+
$supportedReport = $prop->ownerDocument->createElement('d:supported-report');
$prop->appendChild($supportedReport);
@@ -92,9 +91,9 @@ class Sabre_DAV_Property_SupportedReportSet extends Sabre_DAV_Property {
$supportedReport->appendChild($report);
preg_match('/^{([^}]*)}(.*)$/',$reportName,$matches);
-
+
list(, $namespace, $element) = $matches;
-
+
$prefix = isset($server->xmlNamespaces[$namespace])?$server->xmlNamespaces[$namespace]:null;
if ($prefix) {