"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "vendor/sabre/vobject/lib/Document.php" between
sabredav-3.1.2.zip and sabredav-3.1.3.zip

About: SabreDAV allows you to easily add WebDAV support to a PHP application.

Document.php  (sabredav-3.1.2):Document.php  (sabredav-3.1.3)
skipping to change at line 219 skipping to change at line 219
if ($valueType) { if ($valueType) {
// The valueType argument comes first to figure out the correct // The valueType argument comes first to figure out the correct
// class. // class.
$class = $this->getClassNameForPropertyValue($valueType); $class = $this->getClassNameForPropertyValue($valueType);
} }
if (is_null($class)) { if (is_null($class)) {
// If a VALUE parameter is supplied, we should use that. // If a VALUE parameter is supplied, we should use that.
if (isset($parameters['VALUE'])) { if (isset($parameters['VALUE'])) {
$class = $this->getClassNameForPropertyValue($parameters['VALUE' ]); $class = $this->getClassNameForPropertyValue($parameters['VALUE' ]);
if (is_null($class)) {
throw new InvalidDataException('Unsupported VALUE parameter
for ' . $name . ' property. You supplied "' . $parameters['VALUE'] . '"');
}
} }
else { else {
$class = $this->getClassNameForPropertyName($name); $class = $this->getClassNameForPropertyName($name);
} }
} }
if (is_null($parameters)) $parameters = []; if (is_null($parameters)) $parameters = [];
return new $class($this, $name, $value, $parameters, $group); return new $class($this, $name, $value, $parameters, $group);
} }
/** /**
* This method returns a full class-name for a value parameter. * This method returns a full class-name for a value parameter.
* *
* For instance, DTSTART may have VALUE=DATE. In that case we will look in * For instance, DTSTART may have VALUE=DATE. In that case we will look in
* our valueMap table and return the appropriate class name. * our valueMap table and return the appropriate class name.
* *
* This method returns null if we don't have a specialized class. * This method returns null if we don't have a specialized class.
* *
* @param string $valueParam * @param string $valueParam
* * @return string|null
* @return void
*/ */
function getClassNameForPropertyValue($valueParam) { function getClassNameForPropertyValue($valueParam) {
$valueParam = strtoupper($valueParam); $valueParam = strtoupper($valueParam);
if (isset(static::$valueMap[$valueParam])) { if (isset(static::$valueMap[$valueParam])) {
return static::$valueMap[$valueParam]; return static::$valueMap[$valueParam];
} }
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 5 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS