/usr/share/php/sabre21/Sabre/DAV/Property/SupportedMethodSet.php is in php-sabre-dav-2.1 2.1.10-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | <?php
namespace Sabre\DAV\Property;
use Sabre\DAV;
/**
* supported-method-set property.
*
* This property is defined in RFC3253.
*
* @copyright Copyright (C) fruux GmbH (https://fruux.com/)
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
class SupportedMethodSet extends DAV\Property {
/**
* List of methods
*
* @var string[]
*/
protected $methods = [];
/**
* Creates the property
*
* Any reports passed in the constructor should be valid HTTP methods.
*
* @param string[] $methods
*/
function __construct(array $method) {
$this->methods = $method;
}
/**
* Returns the list of supported methods.
*
* @return string[]
*/
function getValue() {
return $this->methods;
}
/**
* Serializes the node
*
* @param DAV\Server $server
* @param \DOMElement $prop
* @return void
*/
function serialize(DAV\Server $server, \DOMElement $prop) {
foreach($this->methods as $method) {
$supportedMethod = $prop->ownerDocument->createElement('d:supported-method');
$supportedMethod->setAttribute('name', $method);
$prop->appendChild($supportedMethod);
}
}
}
|