From 0b02a6d123b2014705998c94ddf3d460948d3eac Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 10 May 2016 17:26:44 -0700 Subject: initial sabre upgrade (needs lots of work - to wit: authentication, redo the browser interface, and rework event export/import) --- vendor/sabre/vobject/lib/Property/Boolean.php | 84 +++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 vendor/sabre/vobject/lib/Property/Boolean.php (limited to 'vendor/sabre/vobject/lib/Property/Boolean.php') diff --git a/vendor/sabre/vobject/lib/Property/Boolean.php b/vendor/sabre/vobject/lib/Property/Boolean.php new file mode 100644 index 000000000..6f5887e25 --- /dev/null +++ b/vendor/sabre/vobject/lib/Property/Boolean.php @@ -0,0 +1,84 @@ +setValue($val); + + } + + /** + * Returns a raw mime-dir representation of the value. + * + * @return string + */ + function getRawMimeDirValue() { + + return $this->value ? 'TRUE' : 'FALSE'; + + } + + /** + * Returns the type of value. + * + * This corresponds to the VALUE= parameter. Every property also has a + * 'default' valueType. + * + * @return string + */ + function getValueType() { + + return 'BOOLEAN'; + + } + + /** + * Hydrate data from a XML subtree, as it would appear in a xCard or xCal + * object. + * + * @param array $value + * + * @return void + */ + function setXmlValue(array $value) { + + $value = array_map( + function($value) { + return 'true' === $value; + }, + $value + ); + parent::setXmlValue($value); + + } + +} -- cgit v1.2.3