src/DAV/SearchHandler.php
private function getPropertiesIteratorResults($results, $propertyNames = [], $depth = 0) {
		$propFindType = $propertyNames ? PropFind::NORMAL : PropFind::ALLPROPS;

		foreach ($results as $result) {
			$node = $result->node;
			$propFind = new PropFind($result->href, (array)$propertyNames, $depth, $propFindType);
			$r = $this->server->getPropertiesByNode($propFind, $node);
			if ($r) {
				$result = $propFind->getResultForMultiStatus();
				$result['href'] = $propFind->getPath();

				// WebDAV recommends adding a slash to the path, if the path is
				// a collection.
				// Furthermore, iCal also demands this to be the case for
				// principals. This is non-standard, but we support it.
				$resourceType = $this->server->getResourceTypeForNode($node);
				if (in_array('{DAV:}collection', $resourceType) || in_array('{DAV:}principal', $resourceType)) {
					$result['href'] .= '/';
				}
				yield $result;
			}
		}
	}
private function getPropertiesIteratorResults($results, $propertyNames = [], $depth = 0) {
		$propFindType = $propertyNames ? PropFind::NORMAL : PropFind::ALLPROPS;

		foreach ($results as $result) {
			$node = $result->node;
			$propFind = new PropFind($result->href, (array)$propertyNames, $depth, $propFindType);
			$r = $this->server->getPropertiesByNode($propFind, $node);
			if ($r) {
				$result = $propFind->getResultForMultiStatus();
				$result['href'] = $propFind->getPath();

				// WebDAV recommends adding a slash to the path, if the path is
				// a collection.
				// Furthermore, iCal also demands this to be the case for
				// principals. This is non-standard, but we support it.
				$resourceType = $this->server->getResourceTypeForNode($node);
				if (in_array('{DAV:}collection', $resourceType) || in_array('{DAV:}principal', $resourceType)) {
					$result['href'] .= '/';
				}
				yield $result;
			}
		}
	}
private function getPropertiesIteratorResults ( $ results , $ propertyNames = [ ] , $ depth = 0 ) { $ propFindType = $ propertyNames ? PropFind :: NORMAL : PropFind :: ALLPROPS ; foreach ( $ results as $ result ) { $ node = $ result -> node ; $ propFind = new PropFind ( $ result -> href , ( array ) $ propertyNames , $ depth , $ propFindType ) ; $ r = $ this -> server -> getPropertiesByNode ( $ propFind , $ node ) ; if ( $ r ) { $ result = $ propFind -> getResultForMultiStatus ( ) ; $ result [ 'href' ] = $ propFind -> getPath ( ) ; // WebDAV recommends adding a slash to the path, if the path is // a collection. // Furthermore, iCal also demands this to be the case for // principals. This is non-standard, but we support it. $ resourceType = $ this -> server -> getResourceTypeForNode ( $ node ) ; if ( in_array ( '{DAV:}collection' , $ resourceType ) || in_array ( '{DAV:}principal' , $ resourceType ) ) { $ result [ 'href' ] .= '/' ; } yield $ result ; } } }
Returns a list of properties for a given path

The path that should be supplied should have the baseUrl stripped out
The list of properties should be supplied in Clark notation. If the list is empty
'allprops' is assumed.

If a depth of 1 is requested child elements will also be returned.

@param SearchResult[] $results
@param array $propertyNames
@param int $depth
@return \Iterator
Returns a list of properties for a given path