Spaces:
Sleeping
Sleeping
Download apps/php-sdk/src/Models/MapOptions.php from s-eto-hub/firecrawl-api: direct link, hf CLI and curl.
- Browser
- Download file 1.65 kB
-
https://huggingface.co/spaces/s-eto-hub/firecrawl-api/resolve/main/apps/php-sdk/src/Models/MapOptions.php
- Command line
-
hf download hf://spaces/s-eto-hub/firecrawl-api/apps/php-sdk/src/Models/MapOptions.php
-
curl -L -o MapOptions.php https://huggingface.co/spaces/s-eto-hub/firecrawl-api/resolve/main/apps/php-sdk/src/Models/MapOptions.php
1.65 kB
| 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); | |
| } | |
| } | |