Changes
Title
unchanged
Implementing a WebDAV server using SabreDAV
Category
unchanged
Tutorials
Yii version
unchanged
Tags
unchanged
WebDAV, CalDAV, CardDAV, SabreDAV, calendar, events, addressbook, address book, vcard
Content
changed
[...]
Below is a simple, stripped from comments example of a principal backend, along with three methods in the User model class.
```php
<?php
use Sabre\DAV;
use Sabre\DAVACL;[...]
```php
<?php
class User extends BaseUser
{
public static function model($className=__CLASS__) {[...]
```php
<?php
Yii::setPathOfAlias('Sabre', Yii::getPathOfAlias('application.vendors.Sabre'));
use Sabre\DAV;
class ClientController extends Controller {
protected $davSettings = array(
'baseUri' => 'dav/',[...]
unset($doc);
$response = $thisclient->request('REPORT', 'calendars/somePrincipal', $body, $headers);
header("Content-type: application/json");
echo CJSON::encode($this->parseMultiStatus($response['body']));
}
}[...]