Spaces:
Runtime error
Runtime error
Download symfony/config/Resource/SkippingResourceChecker.php from Alcazard/vibe-coding-api: direct link, hf CLI and curl.
- Browser
- Download file 1.13 kB
-
https://huggingface.co/spaces/Alcazard/vibe-coding-api/resolve/main/symfony/config/Resource/SkippingResourceChecker.php
- Command line
-
hf download hf://spaces/Alcazard/vibe-coding-api/symfony/config/Resource/SkippingResourceChecker.php
-
curl -L -o SkippingResourceChecker.php https://huggingface.co/spaces/Alcazard/vibe-coding-api/resolve/main/symfony/config/Resource/SkippingResourceChecker.php
1.13 kB
| /* | |
| * 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. | |
| */ | |
| namespace Symfony\Component\Config\Resource; | |
| use Symfony\Component\Config\ResourceCheckerInterface; | |
| class SkippingResourceChecker implements ResourceCheckerInterface | |
| { | |
| private array $skippedResourceTypes; | |
| /** | |
| * @param class-string<ResourceInterface>[] $skippedResourceTypes | |
| */ | |
| public function __construct(array $skippedResourceTypes = []) | |
| { | |
| $this->skippedResourceTypes = array_flip($skippedResourceTypes); | |
| } | |
| public function supports(ResourceInterface $metadata): bool | |
| { | |
| return !$this->skippedResourceTypes || isset($this->skippedResourceTypes[$metadata::class]); | |
| } | |
| public function isFresh(ResourceInterface $resource, int $timestamp): bool | |
| { | |
| return true; | |
| } | |
| public function __serialize(): array | |
| { | |
| return [ | |
| 'skippedResourceTypes' => $this->skippedResourceTypes, | |
| ]; | |
| } | |
| } | |