- Fix: Notifiable-Trait zum User-Model hinzugefuegt (behebt notify()-500er) - Installer: SMTP-Verbindungstest mit EsmtpTransport + Ueberspringen-Link - Admin: Neuer E-Mail-Tab mit SMTP-Konfiguration + Verbindungstest - Admin: Lazy Quill-Initialisierung (nur sichtbare Locale wird geladen) - Uebersetzungen: 17 neue Mail-Keys in allen 6 Sprachen Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
29 lines
608 B
PHP
Executable File
29 lines
608 B
PHP
Executable File
<?php
|
|
|
|
namespace GuzzleHttp;
|
|
|
|
use Psr\Http\Message\MessageInterface;
|
|
|
|
final class BodySummarizer implements BodySummarizerInterface
|
|
{
|
|
/**
|
|
* @var int|null
|
|
*/
|
|
private $truncateAt;
|
|
|
|
public function __construct(?int $truncateAt = null)
|
|
{
|
|
$this->truncateAt = $truncateAt;
|
|
}
|
|
|
|
/**
|
|
* Returns a summarized message body.
|
|
*/
|
|
public function summarize(MessageInterface $message): ?string
|
|
{
|
|
return $this->truncateAt === null
|
|
? Psr7\Message::bodySummary($message)
|
|
: Psr7\Message::bodySummary($message, $this->truncateAt);
|
|
}
|
|
}
|