Files
chill-bundles/src/Bundle/ChillDocStoreBundle/Dav/Response/DavResponse.php
Julien Fastré ba2288de55 Add support for Lock-Token header in DavResponse
- Updated `DAV` header to include version 2.
- Introduced `setLockToken` method to add a `Lock-Token` header.
2026-04-02 14:35:08 +02:00

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;
}
}