[Pkg-owncloud-commits] [php-sabre-vobject] 85/341: !xml Serialize <parameters>.

David Prévot taffit at moszumanska.debian.org
Tue Aug 11 13:35:36 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository php-sabre-vobject.

commit 25c6f5af238cf642323d939a7f7579c433ef1ee6
Author: Ivan Enderlin <ivan.enderlin at hoa-project.net>
Date:   Mon Nov 24 14:50:31 2014 +0100

    !xml Serialize <parameters>.
---
 lib/Property.php | 33 ++++++++++++++++++++++++---------
 1 file changed, 24 insertions(+), 9 deletions(-)

diff --git a/lib/Property.php b/lib/Property.php
index 6aad0cd..740979f 100644
--- a/lib/Property.php
+++ b/lib/Property.php
@@ -360,20 +360,35 @@ abstract class Property extends Node {
             if ($parameter->name === 'VALUE') {
                 continue;
             }
-            $parameters[strtolower($parameter->name)] = $parameter->xmlSerialize();
+            $parameters[] = [
+                'name' => strtolower($parameter->name),
+                'value' => [
+                    [
+                        'name' => 'text',
+                        'value' => $parameter->xmlSerialize()
+                    ]
+                ]
+            ];
         }
 
-        return [
+        $properties = [
             'name' => strtolower($this->name),
-            //(object)$parameters,
-            'value' => [
-                [
-                    'name' => strtolower($this->getValueType()),
-                    'value' => $this->getXmlValue()[0]
-                ]
-            ]
+            'value' => []
+        ];
+
+        if(!empty($parameters))
+            $properties['value'][] = [
+                'name' => 'parameters',
+                'value' => $parameters
+            ];
+
+        $properties['value'][] = [
+            'name' => strtolower($this->getValueType()),
+            'value' => $this->getXmlValue()[0]
         ];
 
+        return $properties;
+
     }
 
     /**

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabre-vobject.git



More information about the Pkg-owncloud-commits mailing list