[Pkg-owncloud-commits] [php-sabre-vobject] 56/341: !xml Support `request-status`.

David Prévot taffit at moszumanska.debian.org
Tue Aug 11 13:35:33 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 412b3880895ed653652c135fd2826e890f0e201a
Author: Ivan Enderlin <ivan.enderlin at hoa-project.net>
Date:   Mon Nov 17 16:10:10 2014 +0100

    !xml Support `request-status`.
---
 lib/Parser/XML.php | 34 +++++++++++++++++++++++++++++++---
 1 file changed, 31 insertions(+), 3 deletions(-)

diff --git a/lib/Parser/XML.php b/lib/Parser/XML.php
index f5f892e..35ad3ef 100644
--- a/lib/Parser/XML.php
+++ b/lib/Parser/XML.php
@@ -131,10 +131,38 @@ class XML extends Parser {
                                 );
                               break 2;
 
-                            /*
                             case 'request-status':
-                              break;
-                            */
+                                $requestChildren = [
+                                    0 => null,
+                                    1 => null
+                                ];
+
+                                foreach($xmlPropertyChildren as $xmlRequestChild) {
+
+                                    $xmlRequestValue = $xmlRequestChild['value'];
+
+                                    switch(static::getTagName($xmlRequestChild['name'])) {
+
+                                        case 'code':
+                                            $requestChildren[0] = $xmlRequestValue;
+                                          break;
+
+                                        case 'description':
+                                            $requestChildren[1] = $xmlRequestValue;
+                                          break;
+
+                                        case 'data':
+                                            $requestChildren[2] = $xmlRequestValue;
+                                          break;
+
+                                        default:
+                                            // TODO: EXCEPTION
+                                          break;
+                                    }
+                                }
+
+                                $property->setParts($requestChildren);
+                              break 2;
 
                             default:
                               break;

-- 
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