Ship the migrated LaySite 1.5.2 site ready to start

This commit is contained in:
2026-11-28 14:58:07 +08:00
parent c105ff288c
commit e2bff08f7d
1161 changed files with 153308 additions and 2 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
namespace GuzzleHttp;
use Psr\Http\Message\MessageInterface;
final class BodySummarizer implements BodySummarizerInterface
{
private ?int $truncateAt;
public function __construct(?int $truncateAt = null)
{
$this->truncateAt = $truncateAt;
}
/**
* Returns a summarized message body.
*/
public function summarize(MessageInterface $message): ?string
{
try {
return Psr7\Message::bodySummary($message, $this->truncateAt);
} catch (\Exception $e) {
return null;
}
}
}