-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLastModifiedDeterminator.php
More file actions
28 lines (24 loc) · 974 Bytes
/
LastModifiedDeterminator.php
File metadata and controls
28 lines (24 loc) · 974 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
/*
* (c) webfactory GmbH <info@webfactory.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Webfactory\HttpCacheBundle\NotModified;
use DateTimeInterface;
use Symfony\Component\HttpFoundation\Request;
/**
* The ReplaceWithNotModifiedResponse method annotation is parameterised with instances of LastModifiedDeterminators.
* Each of them should determine the last modified date of one of the various underlying resources for a response.
* E.g. if your controller's indexAction builds a response containing News and Users, you can write a
* NewsLastModifiedDeterminator determining the date of the last published News and a UserLastModifiedDeterminator
* determining the creation date of the last registered User.
*/
interface LastModifiedDeterminator
{
/**
* @return ?DateTimeInterface
*/
public function getLastModified(Request $request);
}