26 lines
800 B
PHP
26 lines
800 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\ValueObjects;
|
|
|
|
use App\Enums\CrawlOutcomeEnum;
|
|
use Illuminate\Support\Collection;
|
|
|
|
final readonly class FetchResult
|
|
{
|
|
/**
|
|
* @param ?string $finalUrl Set to the request URL in v0.1; true post-redirect URL tracking is deferred (see ticket #12 spec). Downstream consumers MUST NOT trust this field as the post-redirect location until that lands.
|
|
* @param Collection<int, string> $outboundLinks
|
|
*/
|
|
public function __construct(
|
|
public CrawlOutcomeEnum $outcome,
|
|
public ?int $statusCode,
|
|
public ?string $finalUrl,
|
|
public ?string $title,
|
|
public ?string $extractedText,
|
|
public Collection $outboundLinks,
|
|
public ?int $wordCount,
|
|
public ?string $errorMessage,
|
|
) {}
|
|
}
|