. * @param bool $noindex Whether a robots meta tag says noindex. * @param Reference[] $references Links and resources, in document order. * @param PageFacts $facts Head tags and headings. */ public function __construct( public readonly string $url, public readonly string $title, public readonly bool $noindex, public readonly array $references, public readonly PageFacts $facts = new PageFacts() ) {} /** * References of one kind. * * @param string $kind Reference::LINK and friends. * @return Reference[] */ public function of_kind( string $kind ): array { return array_values( array_filter( $this->references, static fn( Reference $r ): bool => $r->kind === $kind ) ); } }