setasign\SetaPDF2\Extractor\Result
Words This class represents words
File: /SetaPDF v2/Extractor/Result/Words.php
Old class name (alias):
\SetaPDF_Extractor_Result_Words
Class hierarchy
Implements
Summary
Properties
Methods
__construct()
public Collection::__construct (
\SetaPDF_Extractor_Result_HasBoundsInterface[] $items = array (
)
)The constructor.
Parameters
getBounds()
Get the outer-most bounds of all items in this collection.
This method will only return values of non-rotated items.
getStringAndOffsets()
public Words::getStringAndOffsets (
string $encoding = 'utf-8'
): array{string: string, offsets: array<int>}Get the words string value including offset positions of the words.
Parameters
- $encoding : string
Return Values
Offsets are only returned if $encoding
is set to UTF-8.
offsetGet()
Implementation of the ArrayAccess interface.
Parameters
- $offset : int
Exceptions
Throws \InvalidArgumentException
See
offsetSet()
Implementation of the ArrayAccess interface.
Parameters
- $offset : ?int
- $value : \SetaPDF_Extractor_Result_WordInterface
Exceptions
Throws \InvalidArgumentException
See
search()
Searches by a regular expression on the string version of the words.
Parameters
- $regex : string
Return Values
The collection will hold Words instances.