diff options
author | Frank Karlitschek <karlitschek@kde.org> | 2011-08-07 17:36:49 +0200 |
---|---|---|
committer | Frank Karlitschek <karlitschek@kde.org> | 2011-08-07 17:36:49 +0200 |
commit | f5a030f4ae5298c2b3325a27e8d05153f0488ea0 (patch) | |
tree | 3317cc1a238a0caaabb23a8c9a26451106f24ec1 /3rdparty/Sabre/VObject/Parameter.php | |
parent | 51caa624bb0874fff878a00fb2883e58ad60cde3 (diff) | |
download | nextcloud-server-f5a030f4ae5298c2b3325a27e8d05153f0488ea0.tar.gz nextcloud-server-f5a030f4ae5298c2b3325a27e8d05153f0488ea0.zip |
remove the ownCloud 3D support and add lot's of usefull 3rd party libraries instead.
Diffstat (limited to '3rdparty/Sabre/VObject/Parameter.php')
-rw-r--r-- | 3rdparty/Sabre/VObject/Parameter.php | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/3rdparty/Sabre/VObject/Parameter.php b/3rdparty/Sabre/VObject/Parameter.php new file mode 100644 index 00000000000..9ebab6ec69b --- /dev/null +++ b/3rdparty/Sabre/VObject/Parameter.php @@ -0,0 +1,81 @@ +<?php + +/** + * VObject Parameter + * + * This class represents a parameter. A parameter is always tied to a property. + * In the case of: + * DTSTART;VALUE=DATE:20101108 + * VALUE=DATE would be the parameter name and value. + * + * @package Sabre + * @subpackage VObject + * @copyright Copyright (C) 2007-2011 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_VObject_Parameter extends Sabre_VObject_Node { + + /** + * Parameter name + * + * @var string + */ + public $name; + + /** + * Parameter value + * + * @var string + */ + public $value; + + /** + * Sets up the object + * + * @param string $name + * @param string $value + */ + public function __construct($name, $value = null) { + + $this->name = strtoupper($name); + $this->value = $value; + + } + + /** + * Turns the object back into a serialized blob. + * + * @return string + */ + public function serialize() { + + $src = array( + '\\', + "\n", + ';', + ',', + ); + $out = array( + '\\\\', + '\n', + '\;', + '\,', + ); + + return $this->name . '=' . str_replace($src, $out, $this->value); + + } + + /** + * Called when this object is being cast to a string + * + * @return string + */ + public function __toString() { + + return $this->value; + + } + +} |