]> git.mxchange.org Git - friendica-addons.git/blob - dav/SabreDAV/lib/Sabre/DAV/Property/ResponseList.php
privacy_image_cache: checking if the cached file really is an image
[friendica-addons.git] / dav / SabreDAV / lib / Sabre / DAV / Property / ResponseList.php
1 <?php
2
3 /**
4  * ResponseList property
5  *
6  * This class represents multiple {DAV:}response XML elements.
7  * This is used by the Server class to encode items within a multistatus
8  * response.
9  *
10  * @package Sabre
11  * @subpackage DAV
12  * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
13  * @author Evert Pot (http://www.rooftopsolutions.nl/)
14  * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
15  */
16 class Sabre_DAV_Property_ResponseList extends Sabre_DAV_Property {
17
18     /**
19      * Response objects.
20      *
21      * @var array
22      */
23     private $responses;
24
25     /**
26      * The only valid argument is a list of Sabre_DAV_Property_Response
27      * objects.
28      *
29      * @param array $responses;
30      */
31     public function __construct($responses) {
32
33         foreach($responses as $response) {
34             if (!($response instanceof Sabre_DAV_Property_Response)) {
35                 throw new InvalidArgumentException('You must pass an array of Sabre_DAV_Property_Response objects');
36             }
37         }
38         $this->responses = $responses;
39
40     }
41
42     /**
43      * serialize
44      *
45      * @param Sabre_DAV_Server $server
46      * @param DOMElement $dom
47      * @return void
48      */
49     public function serialize(Sabre_DAV_Server $server,DOMElement $dom) {
50
51         foreach($this->responses as $response) {
52             $response->serialize($server, $dom);
53         }
54
55     }
56
57 }