interface ResourceCheckerInterface
Interface for ResourceCheckers.
When a ResourceCheckerConfigCache instance is checked for freshness, all its associated metadata resources are passed to ResourceCheckers. The ResourceCheckers can then inspect the resources and decide whether the cache can be considered fresh or not.
bool | supports(ResourceInterface $metadata) Queries the ResourceChecker whether it can validate a given resource or not. | |
bool | isFresh(ResourceInterface $resource, int $timestamp) Validates the resource. |
Queries the ResourceChecker whether it can validate a given resource or not.
ResourceInterface | $metadata | The resource to be checked for freshness |
bool | True if the ResourceChecker can handle this resource type, false if not |
Validates the resource.
ResourceInterface | $resource | The resource to be validated |
int | $timestamp | The timestamp at which the cache associated with this resource was created |
bool | True if the resource has not changed since the given timestamp, false otherwise |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Config/ResourceCheckerInterface.html