Documentation

ScanEntry
in package

A scan result which can be persisted to the database.

Table of Contents

Properties

$attribute  : string
The blockable HTML attribute.
$blockable  : ScannableBlockable
The template blockable which caused this scan entry to be found.
$blocked_url  : string
The found blocked URL.
$blocked_url_hash  : string
The found blocked URL as hash to be used as `UNIQUE KEY`.
$blocked_url_host  : string
The found blocked URL (only the host) for grouping purposes.
$created  : string
Created time (ISO).
$expressions  : array<string|int, string>
The expression of the `host` which is used while found this scan entry. This property is only filled for the scan process itself!
$id  : int
ID.
$lock  : mixed
If `true` no other false-positive mechanisms can modify this scan entry.
$markup  : Markup|null
Markup of the blocked element. This is only set for inline scripts, inline styles and templates with `SelectorSyntaxBlocker`.
$post_id  : int
The `post_id` of `wp_posts` this entry refers to.
$source_url  : string
The source URL this entry was found.
$source_url_hash  : string
The source URL this entry was found as hash to be used as `UNIQUE KEY`.
$tag  : string
The blockable HTML tag.
$template  : string
Template identifier for the content blocker.

Methods

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

Properties

$attribute

The blockable HTML attribute.

public string $attribute

Can be null, e.g. inline scripts.

$blocked_url

The found blocked URL.

public string $blocked_url

$blocked_url_hash

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

public string $blocked_url_hash = ''

$blocked_url_host

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

public string $blocked_url_host

$created

Created time (ISO).

public string $created

$expressions

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

public array<string|int, string> $expressions = []

$lock

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

public mixed $lock = false

$markup

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

public Markup|null $markup

$post_id

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

public int $post_id

$source_url

The source URL this entry was found.

public string $source_url

$source_url_hash

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

public string $source_url_hash

$tag

The blockable HTML tag.

public string $tag

$template

Template identifier for the content blocker.

public string $template = ''

Methods

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!

public calculateFields() : mixed

        
On this page

Search results