resources = $resources; return $this; } public function addResource(ResourceInterface $resource): self { $this->resources[] = $resource; return $this; } public function supports(mixed $item): bool { return $item instanceof ResourceInterface; } public function match(mixed $item): bool { return in_array($item, $this->resources); } }