참고소스 수정본

This commit is contained in:
LASTA_DEV01\lasta
2026-05-12 19:40:31 +09:00
parent 0f34a451fc
commit 2e9204243d
8708 changed files with 3259488 additions and 869 deletions

View File

@@ -0,0 +1,52 @@
<?php
declare(strict_types=1);
namespace Firecrawl\Models;
final class MapOptions
{
private function __construct(
private readonly ?string $search = null,
private readonly ?string $sitemap = null,
private readonly ?bool $includeSubdomains = null,
private readonly ?bool $ignoreQueryParameters = null,
private readonly ?int $limit = null,
private readonly ?int $timeout = null,
private readonly ?string $integration = null,
private readonly ?LocationConfig $location = null,
) {}
public static function with(
?string $search = null,
?string $sitemap = null,
?bool $includeSubdomains = null,
?bool $ignoreQueryParameters = null,
?int $limit = null,
?int $timeout = null,
?string $integration = null,
?LocationConfig $location = null,
): self {
return new self(
$search, $sitemap, $includeSubdomains, $ignoreQueryParameters,
$limit, $timeout, $integration, $location,
);
}
/** @return array<string, mixed> */
public function toArray(): array
{
$fields = [
'search' => $this->search,
'sitemap' => $this->sitemap,
'includeSubdomains' => $this->includeSubdomains,
'ignoreQueryParameters' => $this->ignoreQueryParameters,
'limit' => $this->limit,
'timeout' => $this->timeout,
'integration' => $this->integration,
'location' => $this->location?->toArray(),
];
return array_filter($fields, fn (mixed $v): bool => $v !== null);
}
}