mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-04-09 06:23:45 +00:00
- Updated `DAV` header to include version 2. - Introduced `setLockToken` method to add a `Lock-Token` header.
32 lines
696 B
PHP
32 lines
696 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/*
|
|
* Chill is a software for social workers
|
|
*
|
|
* For the full copyright and license information, please view
|
|
* the LICENSE file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Chill\DocStoreBundle\Dav\Response;
|
|
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
|
|
class DavResponse extends Response
|
|
{
|
|
public function __construct($content = '', int $status = 200, array $headers = [])
|
|
{
|
|
parent::__construct($content, $status, $headers);
|
|
|
|
$this->headers->add(['DAV' => '1,2']);
|
|
}
|
|
|
|
public function setLockToken(string $token): self
|
|
{
|
|
$this->headers->add(['Lock-Token' => $token]);
|
|
|
|
return $this;
|
|
}
|
|
}
|