xref: /plugin/davcal/vendor/sabre/dav/lib/DAV/Xml/Service.php (revision a1a3b6794e0e143a4a8b51d3185ce2d339be61ab)
1*a1a3b679SAndreas Boehler<?php
2*a1a3b679SAndreas Boehler
3*a1a3b679SAndreas Boehlernamespace Sabre\DAV\Xml;
4*a1a3b679SAndreas Boehler
5*a1a3b679SAndreas Boehler/**
6*a1a3b679SAndreas Boehler * XML service for WebDAV
7*a1a3b679SAndreas Boehler *
8*a1a3b679SAndreas Boehler * @copyright Copyright (C) 2007-2015 fruux GmbH (https://fruux.com/).
9*a1a3b679SAndreas Boehler * @author Evert Pot (http://evertpot.com/)
10*a1a3b679SAndreas Boehler * @license http://sabre.io/license/ Modified BSD License
11*a1a3b679SAndreas Boehler */
12*a1a3b679SAndreas Boehlerclass Service extends \Sabre\Xml\Service {
13*a1a3b679SAndreas Boehler
14*a1a3b679SAndreas Boehler    /**
15*a1a3b679SAndreas Boehler     * This is a list of XML elements that we automatically map to PHP classes.
16*a1a3b679SAndreas Boehler     *
17*a1a3b679SAndreas Boehler     * For instance, this list may contain an entry `{DAV:}propfind` that would
18*a1a3b679SAndreas Boehler     * be mapped to Sabre\DAV\Xml\Request\PropFind
19*a1a3b679SAndreas Boehler     */
20*a1a3b679SAndreas Boehler    public $elementMap = [
21*a1a3b679SAndreas Boehler        '{DAV:}multistatus' => 'Sabre\\DAV\\Xml\\Response\\MultiStatus',
22*a1a3b679SAndreas Boehler        '{DAV:}response'    => 'Sabre\\DAV\\Xml\\Element\\Response',
23*a1a3b679SAndreas Boehler
24*a1a3b679SAndreas Boehler        // Requests
25*a1a3b679SAndreas Boehler        '{DAV:}propfind'       => 'Sabre\\DAV\\Xml\\Request\\PropFind',
26*a1a3b679SAndreas Boehler        '{DAV:}propertyupdate' => 'Sabre\\DAV\\Xml\\Request\\PropPatch',
27*a1a3b679SAndreas Boehler        '{DAV:}mkcol'          => 'Sabre\\DAV\\Xml\\Request\\MkCol',
28*a1a3b679SAndreas Boehler
29*a1a3b679SAndreas Boehler        // Properties
30*a1a3b679SAndreas Boehler        '{DAV:}resourcetype' => 'Sabre\\DAV\\Xml\\Property\\ResourceType',
31*a1a3b679SAndreas Boehler
32*a1a3b679SAndreas Boehler    ];
33*a1a3b679SAndreas Boehler
34*a1a3b679SAndreas Boehler    /**
35*a1a3b679SAndreas Boehler     * This is a default list of namespaces.
36*a1a3b679SAndreas Boehler     *
37*a1a3b679SAndreas Boehler     * If you are defining your own custom namespace, add it here to reduce
38*a1a3b679SAndreas Boehler     * bandwidth and improve legibility of xml bodies.
39*a1a3b679SAndreas Boehler     *
40*a1a3b679SAndreas Boehler     * @var array
41*a1a3b679SAndreas Boehler     */
42*a1a3b679SAndreas Boehler    public $namespaceMap = [
43*a1a3b679SAndreas Boehler        'DAV:'                   => 'd',
44*a1a3b679SAndreas Boehler        'http://sabredav.org/ns' => 's',
45*a1a3b679SAndreas Boehler    ];
46*a1a3b679SAndreas Boehler
47*a1a3b679SAndreas Boehler}
48