class BodySummarizer
Hierarchy
- class \GuzzleHttp\BodySummarizer implements \GuzzleHttp\BodySummarizerInterface
Expanded class hierarchy of BodySummarizer
1 file declares its use of BodySummarizer
- RequestException.php in vendor/
guzzlehttp/ guzzle/ src/ Exception/ RequestException.php
File
-
vendor/
guzzlehttp/ guzzle/ src/ BodySummarizer.php, line 7
Namespace
GuzzleHttpView source
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);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
BodySummarizer::$truncateAt | private | property | ||
BodySummarizer::summarize | public | function | Returns a summarized message body. | Overrides BodySummarizerInterface::summarize |
BodySummarizer::__construct | public | function |