apps/dav/lib/Connector/Sabre/FilesReportPlugin.php
/**
	 * Prepare propfind response for the given nodes
	 *
	 * @param string $filesUri $filesUri URI leading to root of the files URI,
	 * with a leading slash but no trailing slash
	 * @param string[] $requestedProps requested properties
	 * @param Node[] nodes nodes for which to fetch and prepare responses
	 * @return Response[]
	 */
Prepare propfind response for the given nodes
@param string $filesUri $filesUri URI leading to root of the files URI,
with a leading slash but no trailing slash
@param string[] $requestedProps requested properties
@param Node[] nodes nodes for which to fetch and prepare responses
@return Response[]
Prepare propfind response for the given nodes @param string $filesUri $filesUri URI leading to root of the files URI with a leading slash but no trailing slash @param string [] $requestedProps requested properties @param Node [] nodes nodes for which to fetch and prepare responses @return Response []
public function prepareResponses($filesUri, $requestedProps, $nodes) {
		$responses = [];
		foreach ($nodes as $node) {
			$propFind = new PropFind($filesUri . $node->getPath(), $requestedProps);
			$this->server->getPropertiesByNode($propFind, $node);
			$result = $propFind->getResultForMultiStatus();
			$result['href'] = $propFind->getPath();
			$resourceType = $this->server->getResourceTypeForNode($node);
			if (in_array('{DAV:}collection', $resourceType) || in_array('{DAV:}principal', $resourceType)) {
				$result['href'] .= '/';
			}
			$responses[] = new Response(
				rtrim($this->server->getBaseUri(), '/') . $filesUri . $node->getPath(),
				$result,
				200
			);
		}
		return $responses;
	}
public function prepareResponses ( $ filesUri , $ requestedProps , $ nodes ) { $ responses = [ ] ; foreach ( $ nodes as $ node ) { $ propFind = new PropFind ( $ filesUri . $ node -> getPath ( ) , $ requestedProps ) ; $ this -> server -> getPropertiesByNode ( $ propFind , $ node ) ; $ result = $ propFind -> getResultForMultiStatus ( ) ; $ result [ 'href' ] = $ propFind -> getPath ( ) ; $ resourceType = $ this -> server -> getResourceTypeForNode ( $ node ) ; if ( in_array ( '{DAV:}collection' , $ resourceType ) || in_array ( '{DAV:}principal' , $ resourceType ) ) { $ result [ 'href' ] .= '/' ; } $ responses [ ] = new Response ( rtrim ( $ this -> server -> getBaseUri ( ) , '/' ) . $ filesUri . $ node -> getPath ( ) , $ result , 200 ) ; } return $ responses ; }
Prepare propfind response for the given nodes
 @param string $filesUri $filesUri URI leading to root of the files URI,
 with a leading slash but no trailing slash
 @param string[] $requestedProps requested properties
 @param Node[] nodes nodes for which to fetch and prepare responses
 @return Response[]
Prepare propfind response for the given nodes @param string $filesUri $filesUri URI leading to root of the files URI with a leading slash but no trailing slash @param string [] $requestedProps requested properties @param Node [] nodes nodes for which to fetch and prepare responses @return Response []
// copied from Sabre Server's getPropertiesForPath