| @@ 335-344 (lines=10) @@ | ||
| 332 | */ |
|
| 333 | public function prepareResponses($filesUri, $requestedProps, $nodes) { |
|
| 334 | $results = []; |
|
| 335 | foreach ($nodes as $node) { |
|
| 336 | $propFind = new PropFind($filesUri . $node->getPath(), $requestedProps); |
|
| 337 | ||
| 338 | $this->server->getPropertiesByNode($propFind, $node); |
|
| 339 | // copied from Sabre Server's getPropertiesForPath |
|
| 340 | $result = $propFind->getResultForMultiStatus(); |
|
| 341 | $result['href'] = $propFind->getPath(); |
|
| 342 | ||
| 343 | $results[] = $result; |
|
| 344 | } |
|
| 345 | return $results; |
|
| 346 | } |
|
| 347 | ||
| @@ 158-170 (lines=13) @@ | ||
| 155 | ||
| 156 | $propFindType = $requestedProps ? PropFind::NORMAL : PropFind::ALLPROPS; |
|
| 157 | ||
| 158 | foreach ($nodes as $path => $node) { |
|
| 159 | $propFind = new PropFind( |
|
| 160 | $path, |
|
| 161 | $requestedProps, |
|
| 162 | 0, |
|
| 163 | $propFindType |
|
| 164 | ); |
|
| 165 | $this->server->getPropertiesByNode($propFind, $node); |
|
| 166 | ||
| 167 | $result = $propFind->getResultForMultiStatus(); |
|
| 168 | $result['href'] = $propFind->getPath(); |
|
| 169 | yield $result; |
|
| 170 | } |
|
| 171 | } |
|
| 172 | ||
| 173 | /** |
|