isValid()) { OCA\mozilla_sync\Utils::changeHttpStatus(404); exit(); } // Get service type based on URL and determine whether to start user or storage service $service = OCA\mozilla_sync\Utils::getServiceType(); if ($service === 'userapi') { // Send a timestamp header OCA\mozilla_sync\Utils::sendMozillaTimestampHeader(); $userService = new OCA\mozilla_sync\UserService($urlParser); $userService->run(); } else if ($service === 'storageapi') { // Note: Timestamp header will be sent later by storage API service $storageService = new OCA\mozilla_sync\StorageService($urlParser); $storageService->run(); } /* vim: set ts=4 sw=4 tw=80 noet : */