PartitionedDocument
final readonly class \
A document divided into parts, such as the page ranges of a PDF. It is only valid within PartitionedTextExtractorInterface::withPartitionedDocument(), which provides the local file all parts are extracted from.
Internal
Table of Contents
Properties
- $parts : array
Methods
- __construct() : mixed
- extractPart() : ExtractedText
- The text and metadata of a single part, one of $parts
Properties
$parts
public
array
$parts
Methods
__construct()
public
__construct(array<int, string> $parts, callable(string): ExtractedText $partExtractor) : mixed
Parameters
- $parts : array<int, string>
-
Pointers to the parts, for example "1-5" and "6-10", or a single "0" for an undivided document
- $partExtractor : callable(string): ExtractedText
extractPart()
The text and metadata of a single part, one of $parts
public
extractPart(string $part) : ExtractedText
Parameters
- $part : string