SetaPDF_Extractor_Result_Words This class represents words
File: /SetaPDF v2/Extractor/Result/Words.php
Class hierarchy
Implements
Summary
Properties
$_items
protected SetaPDF_Extractor_Result_WordInterface[] SetaPDF_Extractor_Result_Words::$_items = array()
Methods
__construct()
public SetaPDF_Extractor_Result_Collection::__construct (
[ SetaPDF_Extractor_Result_HasBoundsInterface[] $items = array (
) ]
)The constructor.
Parameters
current()
public SetaPDF_Extractor_Result_Words::current (
void
): SetaPDF_Extractor_Result_WordInterface|nullImplementation of the Iterator interface.
See
getBounds()
Get the outer-most bounds of all items in this collection.
This method will only return values of non-rotated items.
getStringAndOffsets()
public SetaPDF_Extractor_Result_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()
public SetaPDF_Extractor_Result_Words::offsetGet (
int $offset
): SetaPDF_Extractor_Result_WordInterfaceImplementation of the ArrayAccess interface.
Parameters
- $offset : int
Exceptions
Throws InvalidArgumentException
See
offsetSet()
public SetaPDF_Extractor_Result_Words::offsetSet (
null|int $offset, SetaPDF_Extractor_Result_WordInterface $value
): voidImplementation of the ArrayAccess interface.
Parameters
- $offset : null|int
- $value : SetaPDF_Extractor_Result_WordInterface
Exceptions
Throws InvalidArgumentException
See
search()
public SetaPDF_Extractor_Result_Words::search (
string $regex
): SetaPDF_Extractor_Result_CollectionSearches by a regular expression on the string version of the words.
Parameters
- $regex : string
Return Values
The collection will hold SetaPDF_Extractor_Result_Words instances.