[Pkg-owncloud-commits] [php-sabre-vobject] 54/341: !xml Implement the `geo` property.
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 66d34258414b7ab6d178e6c1a41b86e4bc79d46b
Author: Ivan Enderlin <ivan.enderlin at hoa-project.net>
Date: Mon Nov 17 15:28:31 2014 +0100
!xml Implement the `geo` property.
---
lib/Parser/XML.php | 40 ++++++++++++++++++++++++++++++++++++----
1 file changed, 36 insertions(+), 4 deletions(-)
diff --git a/lib/Parser/XML.php b/lib/Parser/XML.php
index 10eb852..eaba46b 100644
--- a/lib/Parser/XML.php
+++ b/lib/Parser/XML.php
@@ -88,27 +88,59 @@ class XML extends Parser {
);
$parentComponent->add($property);
- /*
+ // special cases
switch($propertyName) {
- // special cases
+ /*
case 'categories':
case 'resources':
case 'freebusy':
case 'exdate':
case 'rdate':
break;
+ */
case 'geo':
- break;
+ $latitude = null;
+ $longitude = null;
+
+ foreach($xmlPropertyChildren as $xmlGeoChild) {
+
+ $xmlGeoValue = $xmlGeoChild['value'];
+
+ switch(static::getTagName($xmlGeoChild['name'])) {
+
+ case 'latitude':
+ $latitude = $xmlGeoValue;
+ break;
+
+ case 'longitude':
+ $longitude = $xmlGeoValue;
+ break;
+
+ default:
+ // TODO: EXCEPTION
+ break;
+ }
+ }
+
+ var_dump($latitude, $longitude);
+
+ $property->setRawMimeDirValue(
+ $latitude .
+ ';' .
+ $longitude
+ );
+ break 2;
+ /*
case 'request-status':
break;
+ */
default:
break;
}
- */
foreach($xmlPropertyChildren as $xmlPropertyChild) {
--
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