Collection.php 822 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. declare(strict_types=1);
  3. namespace Sabre\CalDAV\Principal;
  4. use Sabre\DAVACL;
  5. /**
  6. * Principal collection.
  7. *
  8. * This is an alternative collection to the standard ACL principal collection.
  9. * This collection adds support for the calendar-proxy-read and
  10. * calendar-proxy-write sub-principals, as defined by the caldav-proxy
  11. * specification.
  12. *
  13. * @copyright Copyright (C) fruux GmbH (https://fruux.com/)
  14. * @author Evert Pot (http://evertpot.com/)
  15. * @license http://sabre.io/license/ Modified BSD License
  16. */
  17. class Collection extends DAVACL\PrincipalCollection
  18. {
  19. /**
  20. * Returns a child object based on principal information.
  21. *
  22. * @return User
  23. */
  24. public function getChildForPrincipal(array $principalInfo)
  25. {
  26. return new User($this->principalBackend, $principalInfo);
  27. }
  28. }