SetaPDF_Extractor_Filter_Multi The multi filter allows you to create a filter by several filter instances.

File: /SetaPDF v2/Extractor/Filter/Multi.php

The filters are evaluated by an OR logic by default. If one of the filters match, the item will be accepted. It is also possible to use the filter with an AND logic by passing the mode constant to its snd parameter of the constructor.

Class hierarchy

Implements

Summary

Constants

MODE_AND

public const string SetaPDF_Extractor_Filter_Multi::MODE_AND = 'and'

A mode constant.

Defines that the filter should work in "and"-mode: All filters have to accept the text item.

MODE_OR

public const string SetaPDF_Extractor_Filter_Multi::MODE_OR = 'or'

A mode constant.

Defines that the filter should work in "or"-mode: At least one filter have to accept the text item.


Properties

$_filters

$_id

protected string|null SetaPDF_Extractor_Filter_Multi::$_id

The id of this filter.

$_mode

protected string SetaPDF_Extractor_Filter_Multi::$_mode = 'or'

The mode to work with.


Methods

__construct()

The constructor.

Parameters
$filters : SetaPDF_Extractor_Filter_FilterInterface|SetaPDF_Extractor_Filter_FilterInterface[]

,...

$mode : string
 
$id : string|null

The id for this filter.

accept()

Checks if this filter accepts the text item.

Parameters
$textItem : SetaPDF_Extractor_TextItem
 
Return Values

True or false whether the item is accepted or not.

addFilter()

getId()

public SetaPDF_Extractor_Filter_Multi::getId (
void
): null|string

Get the filter id.

getMode()

public SetaPDF_Extractor_Filter_Multi::getMode (
void
): string

Get the mode.

resetFilters()

Reset all filters.

setPage()

Set the current page object for the specific filter.

Parameters
$page : SetaPDF_Core_Document_Page