xref: /plugin/davcal/vendor/sabre/dav/lib/CalDAV/Principal/Collection.php (revision a1a3b6794e0e143a4a8b51d3185ce2d339be61ab)
1*a1a3b679SAndreas Boehler<?php
2*a1a3b679SAndreas Boehler
3*a1a3b679SAndreas Boehlernamespace Sabre\CalDAV\Principal;
4*a1a3b679SAndreas Boehler
5*a1a3b679SAndreas Boehleruse Sabre\DAVACL;
6*a1a3b679SAndreas Boehler
7*a1a3b679SAndreas Boehler/**
8*a1a3b679SAndreas Boehler * Principal collection
9*a1a3b679SAndreas Boehler *
10*a1a3b679SAndreas Boehler * This is an alternative collection to the standard ACL principal collection.
11*a1a3b679SAndreas Boehler * This collection adds support for the calendar-proxy-read and
12*a1a3b679SAndreas Boehler * calendar-proxy-write sub-principals, as defined by the caldav-proxy
13*a1a3b679SAndreas Boehler * specification.
14*a1a3b679SAndreas Boehler *
15*a1a3b679SAndreas Boehler * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
16*a1a3b679SAndreas Boehler * @author Evert Pot (http://evertpot.com/)
17*a1a3b679SAndreas Boehler * @license http://sabre.io/license/ Modified BSD License
18*a1a3b679SAndreas Boehler */
19*a1a3b679SAndreas Boehlerclass Collection extends DAVACL\PrincipalCollection {
20*a1a3b679SAndreas Boehler
21*a1a3b679SAndreas Boehler    /**
22*a1a3b679SAndreas Boehler     * Returns a child object based on principal information
23*a1a3b679SAndreas Boehler     *
24*a1a3b679SAndreas Boehler     * @param array $principalInfo
25*a1a3b679SAndreas Boehler     * @return User
26*a1a3b679SAndreas Boehler     */
27*a1a3b679SAndreas Boehler    function getChildForPrincipal(array $principalInfo) {
28*a1a3b679SAndreas Boehler
29*a1a3b679SAndreas Boehler        return new User($this->principalBackend, $principalInfo);
30*a1a3b679SAndreas Boehler
31*a1a3b679SAndreas Boehler    }
32*a1a3b679SAndreas Boehler
33*a1a3b679SAndreas Boehler}
34