feat: add MCP server for the website chatbot over a mirrored TYPO3 content feed
This commit is contained in:
1 parent
ff7ddf7a9e
commit
1b4384e3f3
52 files changed
+5117
-4
No files matched your search
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Model\ContentFeed;
|
||||
|
||||
/**
|
||||
* Outcome of fetching one page's contentUrl.
|
||||
*
|
||||
* A 404 or 5xx is a failure of that page, remembered against its `modified`. A timeout is
|
||||
* transient: the page keeps its stored version and is retried next run.
|
||||
*/
|
||||
final readonly class PageFetchResult
|
||||
{
|
||||
private function __construct(
|
||||
public ?string $html,
|
||||
public ?int $failedStatus,
|
||||
public bool $transient,
|
||||
) {
|
||||
}
|
||||
|
||||
public static function ok(string $html): self
|
||||
{
|
||||
return new self($html, null, false);
|
||||
}
|
||||
|
||||
public static function failed(int $status): self
|
||||
{
|
||||
return new self(null, $status, false);
|
||||
}
|
||||
|
||||
public static function transient(): self
|
||||
{
|
||||
return new self(null, null, true);
|
||||
}
|
||||
|
||||
public function isOk(): bool
|
||||
{
|
||||
return null !== $this->html;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user