2021-05-10 00:23:30 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This file is part of the Symfony package.
|
|
|
|
*
|
|
|
|
* (c) Fabien Potencier <fabien@symfony.com>
|
|
|
|
*
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
*/
|
2021-12-12 00:33:56 +00:00
|
|
|
namespace RectorPrefix20211212\Symfony\Component\Config;
|
2021-05-10 00:23:30 +00:00
|
|
|
|
2021-12-12 00:33:56 +00:00
|
|
|
use RectorPrefix20211212\Symfony\Component\Config\Resource\ResourceInterface;
|
2021-05-10 00:23:30 +00:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* @author Matthias Pigulla <mp@webfactory.de>
|
|
|
|
* @author Benjamin Klotz <bk@webfactory.de>
|
|
|
|
*/
|
|
|
|
interface ResourceCheckerInterface
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Queries the ResourceChecker whether it can validate a given
|
|
|
|
* resource or not.
|
|
|
|
*
|
2021-11-30 07:57:42 +00:00
|
|
|
* @return bool
|
2021-05-10 00:23:30 +00:00
|
|
|
*/
|
2021-12-12 00:33:56 +00:00
|
|
|
public function supports(\RectorPrefix20211212\Symfony\Component\Config\Resource\ResourceInterface $metadata);
|
2021-05-10 00:23:30 +00:00
|
|
|
/**
|
|
|
|
* Validates the resource.
|
|
|
|
*
|
|
|
|
* @param int $timestamp The timestamp at which the cache associated with this resource was created
|
|
|
|
*
|
2021-11-30 07:57:42 +00:00
|
|
|
* @return bool
|
2021-05-10 00:23:30 +00:00
|
|
|
*/
|
2021-12-12 00:33:56 +00:00
|
|
|
public function isFresh(\RectorPrefix20211212\Symfony\Component\Config\Resource\ResourceInterface $resource, int $timestamp);
|
2021-05-10 00:23:30 +00:00
|
|
|
}
|