4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Config\Resource;
14 use Symfony\Component\Config\ResourceCheckerInterface;
17 * Resource checker for instances of SelfCheckingResourceInterface.
19 * As these resources perform the actual check themselves, we can provide
20 * this class as a standard way of validating them.
22 * @author Matthias Pigulla <mp@webfactory.de>
24 class SelfCheckingResourceChecker implements ResourceCheckerInterface
26 public function supports(ResourceInterface $metadata)
28 return $metadata instanceof SelfCheckingResourceInterface;
31 public function isFresh(ResourceInterface $resource, $timestamp)
33 /* @var SelfCheckingResourceInterface $resource */
34 return $resource->isFresh($timestamp);