\DevOwl\HeadlessContentBlocker\plugins\scannerScanEntry

A scan result which can be persisted to the database.

Summary

Methods
Properties
Constants
calculateFields()
$blockable
$expressions
$id
$preset
$blocked_url
$blocked_url_host
$blocked_url_hash
$markup
$tag
$attribute
$post_id
$source_url
$source_url_hash
$ignored
$created
$lock
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$expressions

$expressions :array<mixed,string>

The expression of the `host` which is used while found this scan entry. This property is only filled for the scan process itself!

Type

array<mixed,string>

$id

$id :integer

ID.

Type

integer

$preset

$preset :string

Preset identifier for the content blocker.

Type

string

$blocked_url

$blocked_url :string

The found blocked URL.

Type

string

$blocked_url_host

$blocked_url_host :string

The found blocked URL (only the host) for grouping purposes.

Type

string

$blocked_url_hash

$blocked_url_hash :string

The found blocked URL as hash to be used as `UNIQUE KEY`.

Type

string

$markup

$markup :\DevOwl\HeadlessContentBlocker\Markup|null

Markup of the blocked element. This is only set for inline scripts, inline styles and presets with `SelectorSyntaxBlocker`.

Type

\DevOwl\HeadlessContentBlocker\Markup|null

$tag

$tag :string

The blockable HTML tag.

Type

string

$attribute

$attribute :string

The blockable HTML attribute.

Can be null, e.g. inline scripts.

Type

string

$post_id

$post_id :integer

The `post_id` of `wp_posts` this entry refers to.

Type

integer

$source_url

$source_url :string

The source URL this entry was found.

Type

string

$source_url_hash

$source_url_hash :string

The source URL this entry was found as hash to be used as `UNIQUE KEY`.

Type

string

$ignored

$ignored :boolean

Got his entry ignored?

Type

boolean

$created

$created :string

Created time (ISO).

Type

string

$lock

$lock :

If `true` no other false-positive mechanisms can modify this scan entry.

Type

Methods

calculateFields()

calculateFields()

Calculate some fields. This is necessary, so we do not need to always calculate hashes and hosts. Do this before persisting to your database!