SetaPDF_Extractor_Result_Words This class represents words

File: /SetaPDF v2/Extractor/Result/Words.php

Class hierarchy

Implements

Summary

Properties


Methods

__construct()

__toString()

Reconstruct the plain text of all words in that collection.

cleanUp()

Release memory and cycled references

count()

Implementation of the Countable interface.

See

current()

getBounds()

Get the outer-most bounds of all items in this collection.

This method will only return values of non-rotated items.

getString()

public SetaPDF_Extractor_Result_Words::getString (
[ string $encoding = 'utf-8' ]
): string

Get the words string value in a specific encoding.

Parameters
$encoding : string
 

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.

key()

Implementation of the Iterator interface.

See

next()

Implementation of the Iterator interface.

See

offsetExists()

Implementation of the ArrayAccess interface.

Parameters
$offset : int
 
See

offsetGet()

Implementation of the ArrayAccess interface.

Parameters
$offset : int
 
Exceptions

Throws InvalidArgumentException

See

offsetSet()

Implementation of the ArrayAccess interface.

Parameters
$offset : null|int
 
$value : SetaPDF_Extractor_Result_WordInterface
 
Exceptions

Throws InvalidArgumentException

See

offsetUnset()

public SetaPDF_Extractor_Result_Collection::offsetUnset (
int $offset
): void

Implementation of the ArrayAccess interface.

Parameters
$offset : int
 
See

rewind()

Implementation of the Iterator interface.

See

search()

Searches 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.

See

valid()

Implementation of the Iterator interface.

See