setasign\SetaPDF2\Extractor\Strategy
AbstractStrategy Abstract class representing an extraction strategy.
File: /SetaPDF v2/Extractor/Strategy/AbstractStrategy.php
Old class name (alias):
\SetaPDF_Extractor_Strategy_AbstractStrategy
Class hierarchy
Summary
Properties
$_cleanStreamCallback
protected callable AbstractStrategy::$_cleanStreamCallback
A callback that is called before processing a stream.
Methods
_accept()
Proxy method that forwards the call to a filter instance if available.
Parameters
- $textItem : \SetaPDF_Extractor_TextItem
Exceptions
Throws \setasign\SetaPDF2\Extractor\Exception
Throws \setasign\SetaPDF2\Core\Exception
See
_getSubInstance()
Get an instance of the same strategy for processing another stream (e.g. a Form XObject stream).
Parameters
getResult()
Get the strategy specific result.
Parameters
- $stream : string
- $resources : \SetaPDF_Core_Type_Dictionary
process()
Processes a stream through this strategy.
The result is an array of \setasign\SetaPDF2\Extractor\TextItem instances.
Parameters
- $stream : string
- $resources : \SetaPDF_Core_Type_Dictionary
setBoundary()
setCleanStreamCallback()
Set a callback that is called before processing a stream.
Parameters
- $callback : ?callable
setFilter()
public AbstractStrategy::setFilter (
?\SetaPDF_Extractor_Filter_FilterInterface $filter = null
): voidSet a filter.
Parameters
- $filter : ?\SetaPDF_Extractor_Filter_FilterInterface
setIgnoreFaultyStreams()
Define wether to continue when a stream cannot be decoded or not.
Parameters
- $ignoreFaultyStreams : bool