SetaPDF_Extractor_Result_Word This class represents a single word

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

Class hierarchy

Implements

Summary

Static Properties

$_ignoreConstructor

Defines if the constructor logic will be ignored or not.


Properties

$_bounds

The bounds of this word.

$_filterId

The filter id of the first text item in.

$_parts

protected self[] SetaPDF_Extractor_Result_Word::$_parts = array()

The initial words that were used to create this word.

$_word

protected array SetaPDF_Extractor_Result_Word::$_word = array()

The resulting word in a specific encoding.


Static Methods

merge()

public static SetaPDF_Extractor_Result_Word::merge (
self $a, self $b, string $resultingString
): SetaPDF_Extractor_Result_Word

Merges two SetaPDF_Extractor_Result_Word instances into a new one.

The words text-content will be $resultingString.

Parameters
$a : self
 
$b : self
 
$resultingString : string

In UTF-8 encoding.


Methods

__construct()

cleanUp()

public SetaPDF_Extractor_Result_Word::cleanUp (
void
): void

Release memory and cycled references.

getBounds()

Get the bounds of this word.

getFilterId()

public SetaPDF_Extractor_Result_Word::getFilterId (
void
): null|string

Get the id of the filter instance that accepted this result.

getParts()

public SetaPDF_Extractor_Result_Word::getParts (
void
): self[]

Get all parts of this word.

If the word is not created by several words, this method will return itself.

getString()

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

Get the words string value in a specific encoding.

Parameters
$encoding : string