apps/dav/lib/CalDAV/Search/SearchPlugin.php
/**
	 * This function handles the calendar-query REPORT
	 *
	 * This report is used by clients to request calendar objects based on
	 * complex conditions.
	 *
	 * @param Xml\Request\CalendarSearchReport $report
	 * @return void
	 */
This function handles the calendar-query REPORT
This report is used by clients to request calendar objects based on
complex conditions.

@param Xml\Request\CalendarSearchReport $report
@return void
This function handles the calendar - query REPORT This report is used by clients to request calendar objects based on complex conditions . @param Xml \ Request \ CalendarSearchReport $report @return void
private function calendarSearch($report) {
		$node = $this->server->tree->getNodeForPath($this->server->getRequestUri());
		$depth = $this->server->getHTTPDepth(2);
		$result = [];
		if ($node instanceof CalendarHome && $depth == 2) {
			$nodePaths = $node->calendarSearch($report->filters, $report->limit, $report->offset);
			foreach ($nodePaths as $path) {
				list($properties) = $this->server->getPropertiesForPath(
					$this->server->getRequestUri() . '/' . $path,
					$report->properties);
				$result[] = $properties;
			}
		}
		$prefer = $this->server->getHTTPPrefer();
		$this->server->httpResponse->setStatus(207);
		$this->server->httpResponse->setHeader('Content-Type',
			'application/xml; charset=utf-8');
		$this->server->httpResponse->setHeader('Vary', 'Brief,Prefer');
		$this->server->httpResponse->setBody(
			$this->server->generateMultiStatus($result,
				$prefer['return'] === 'minimal'));
	}
private function calendarSearch ( $ report ) { $ node = $ this -> server -> tree -> getNodeForPath ( $ this -> server -> getRequestUri ( ) ) ; $ depth = $ this -> server -> getHTTPDepth ( 2 ) ; $ result = [ ] ; if ( $ node instanceof CalendarHome && $ depth == 2 ) { $ nodePaths = $ node -> calendarSearch ( $ report -> filters , $ report -> limit , $ report -> offset ) ; foreach ( $ nodePaths as $ path ) { list ( $ properties ) = $ this -> server -> getPropertiesForPath ( $ this -> server -> getRequestUri ( ) . '/' . $ path , $ report -> properties ) ; $ result [ ] = $ properties ; } } $ prefer = $ this -> server -> getHTTPPrefer ( ) ; $ this -> server -> httpResponse -> setStatus ( 207 ) ; $ this -> server -> httpResponse -> setHeader ( 'Content-Type' , 'application/xml; charset=utf-8' ) ; $ this -> server -> httpResponse -> setHeader ( 'Vary' , 'Brief,Prefer' ) ; $ this -> server -> httpResponse -> setBody ( $ this -> server -> generateMultiStatus ( $ result , $ prefer [ 'return' ] === 'minimal' ) ) ; }
This function handles the calendar-query REPORT
 This report is used by clients to request calendar objects based on
 complex conditions.
This function handles the calendar - query REPORT This report is used by clients to request calendar objects based on complex conditions .
// The default result is an empty array // If we're dealing with the calendar home, the calendar home itself is // responsible for the calendar-query