CalDavUserManager

🔧 __construct

function __construct( string $baseUrl, string $adminUsername, string $adminPassword, string $principalPrefix = 'principals' ) { $this->baseUrl = rtrim($baseUrl, '/'); $this->adminUsername = $adminUsername; $this->adminPassword = $adminPassword; $this->principalPrefix = $principalPrefix; $this->username = $adminUsername; $this->password = $adminPassword; $this->setDefaultHeaders([ 'Content-Type: application/xml; charset=utf-8', 'Depth: 0' // ... (truncated)

⚙️ Parameters


🔧 storeFeedToken

Store the feed token for a calendar You'll need to implement this based on your storage system
function storeFeedToken(string $username, string $calendarName, string $token): void { // Example implementation using a property on the calendar object $calendarUrl = "{$this->baseUrl}

🔧 updateProperties

Update WebDAV properties
function updateProperties(string $url, array $properties): bool { $this->initCurl($url, 'PROPPATCH'); $xml = $this->buildProppatchXml($properties); curl_setopt($this->ch, CURLOPT_POSTFIELDS, $xml); $result = $this->executeRequest(); return $result['httpCode'] === 207; }

🔧 sanitizeCalendarName

Sanitize calendar name for URL usage
function sanitizeCalendarName(string $name): string { // Remove any character that's not alphanumeric, dash, or underscore $sanitized = preg_replace('/[^a-zA-Z0-9-_]/', '-', $name); // Convert to lowercase return strtolower($sanitized); }