ResourceCheckerInterface
in
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.
Tags
Table of Contents
Methods
- isFresh() : bool
- Validates the resource.
- supports() : bool
- Queries the ResourceChecker whether it can validate a given resource or not.
Methods
isFresh()
Validates the resource.
public
isFresh(ResourceInterface $resource, int $timestamp) : bool
Parameters
- $resource : ResourceInterface
- $timestamp : int
-
The timestamp at which the cache associated with this resource was created
Return values
boolsupports()
Queries the ResourceChecker whether it can validate a given resource or not.
public
supports(ResourceInterface $metadata) : bool
Parameters
- $metadata : ResourceInterface