SetaPDF_Extractor_Strategy_AbstractStrategy Abstract class representing an extraction strategy.
File: /SetaPDF v2/Extractor/Strategy/AbstractStrategy.php
Class hierarchy
Summary
Properties
$_boundaryFilter
protected null|SetaPDF_Extractor_Filter_Rectangle SetaPDF_Extractor_Strategy_AbstractStrategy::$_boundaryFilter
The boundary filter.
$_cleanStreamCallback
protected callable SetaPDF_Extractor_Strategy_AbstractStrategy::$_cleanStreamCallback
A callback that is called before processing a stream.
$_filter
protected null|SetaPDF_Extractor_Filter_FilterInterface SetaPDF_Extractor_Strategy_AbstractStrategy::$_filter
A filter.
Methods
_accept()
protected SetaPDF_Extractor_Strategy_AbstractStrategy::_accept (
SetaPDF_Extractor_TextItem $textItem
): bool|stringProxy method that forwards the call to a filter instance if available.
Parameters
- $textItem : SetaPDF_Extractor_TextItem
Exceptions
Throws SetaPDF_Extractor_Exception
Throws SetaPDF_Core_Exception
See
_getSubInstance()
protected SetaPDF_Extractor_Strategy_AbstractStrategy::_getSubInstance (): SetaPDF_Extractor_Strategy_AbstractStrategy
Get an instance of the same strategy for processing another stream (e.g. a Form XObject stream).
Parameters
getBoundary()
public SetaPDF_Extractor_Strategy_AbstractStrategy::getBoundary (
void
): SetaPDF_Core_Geometry_Rectangle|nullgetFilter()
public SetaPDF_Extractor_Strategy_AbstractStrategy::getFilter (
void
): null|SetaPDF_Extractor_Filter_FilterInterfaceGet the filter.
getResult()
abstract public SetaPDF_Extractor_Strategy_AbstractStrategy::getResult (
string $stream, SetaPDF_Core_Type_Dictionary $resources
): mixedGet the strategy specific result.
Parameters
- $stream : string
- $resources : SetaPDF_Core_Type_Dictionary
process()
abstract public SetaPDF_Extractor_Strategy_AbstractStrategy::process (
string $stream, SetaPDF_Core_Type_Dictionary $resources
): SetaPDF_Extractor_TextItem[]Processes a stream through this strategy.
The result is an array of SetaPDF_Extractor_TextItem
instances.
Parameters
- $stream : string
- $resources : SetaPDF_Core_Type_Dictionary
setBoundary()
public SetaPDF_Extractor_Strategy_AbstractStrategy::setBoundary (
[ SetaPDF_Core_Geometry_Rectangle|null $boundary = null ]
): voidSets the boundary for the current strategy.
Parameters
- $boundary : SetaPDF_Core_Geometry_Rectangle|null
setCleanStreamCallback()
public SetaPDF_Extractor_Strategy_AbstractStrategy::setCleanStreamCallback (
[ callable|null $callback = null ]
): voidSet a callback that is called before processing a stream.
Parameters
- $callback : callable|null
setFilter()
public SetaPDF_Extractor_Strategy_AbstractStrategy::setFilter (
[ SetaPDF_Extractor_Filter_FilterInterface|null $filter = null ]
): voidSet a filter.
Parameters
- $filter : SetaPDF_Extractor_Filter_FilterInterface|null
setIgnoreFaultyStreams()
public SetaPDF_Extractor_Strategy_AbstractStrategy::setIgnoreFaultyStreams (
boolean $ignoreFaultyStreams
): voidDefine wether to continue when a stream cannot be decoded or not.
Parameters
- $ignoreFaultyStreams : boolean