Documentation

Query
in package
Uses UtilsProvider

Query scan results.

Table of Contents

Constants

MIME_TYPE_CSS  = 'text/css'
MIME_TYPE_HTML  = 'text/html'
MIME_TYPE_JAVASCRIPT  = 'text/javascript'
TRANSIENT_SCANNED_EXTERNAL_URLS  = RCB_OPT_PREFIX . '-scanned-external-urls'

Methods

__construct()  : mixed
C'tor.
getAllScannedExternalUrlsBy()  : mixed
Get scanned external URLs by host. This includes source page and complete blocked URL instead of only host.
getMarkup()  : mixed
Get markup by ID. This also returns the mime type used for the blocked content.
getPluginConstantPrefix()  : string
Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
getScannedCombinedResults()  : mixed
Get a list of found templates and external URL hosts.
getScannedEntriesCount()  : int
Get a count of all scanned entries.
getScannedExternalUrls()  : array<string|int, mixed>
Get scanned external URLs aggregated by host.
getScannedSourceUrls()  : mixed
Get all (known) scanned pages.
getScannedTemplates()  : mixed
Get a list of scanned templates.
getScannedTemplateStats()  : mixed
Get scanned templates with details about the amount of found times, and the last scanned.
removeSourceUrls()  : int
Remove scanned entries by source urls. This can be useful if you know a page got deleted.
revisionCurrent()  : mixed
Provide a count for all scan results.
checkIfMarkupIsBlocked()  : mixed
Check server-side via PHP if the markup got blocked by an existing content blocker.
getExistingUrlExpressions()  : mixed
Calculate all existing expressions for blocked URLs.
transformExpressionsToMySQL()  : mixed
Transform a set of expression strings to a valid SQL statement. The regular expressions are combined with `OR` so you can check e.g. an URL column if it matches.

Constants

MIME_TYPE_CSS

public mixed MIME_TYPE_CSS = 'text/css'

MIME_TYPE_HTML

public mixed MIME_TYPE_HTML = 'text/html'

MIME_TYPE_JAVASCRIPT

public mixed MIME_TYPE_JAVASCRIPT = 'text/javascript'

TRANSIENT_SCANNED_EXTERNAL_URLS

public mixed TRANSIENT_SCANNED_EXTERNAL_URLS = RCB_OPT_PREFIX . '-scanned-external-urls'

Methods

__construct()

C'tor.

public __construct() : mixed
Tags
codeCoverageIgnore

getAllScannedExternalUrlsBy()

Get scanned external URLs by host. This includes source page and complete blocked URL instead of only host.

public getAllScannedExternalUrlsBy(string $by, string $value) : mixed
Parameters
$by : string

Can be host or template

$value : string

getMarkup()

Get markup by ID. This also returns the mime type used for the blocked content.

public getMarkup(int|array<string|int, int> $ids) : mixed

This can also be null when the scanned element is only blocked by URL (e.g. not by inline script, style or SelectorSyntaxBlocker).

Parameters
$ids : int|array<string|int, int>

getPluginConstantPrefix()

Get the prefix of this plugin so composer packages can dynamically build other constant values on it.

public getPluginConstantPrefix() : string
Tags
codeCoverageIgnore

It only returns a string with the constant prefix

Return values
string

getScannedCombinedResults()

Get a list of found templates and external URL hosts.

public getScannedCombinedResults() : mixed

getScannedEntriesCount()

Get a count of all scanned entries.

public getScannedEntriesCount() : int
Return values
int

getScannedExternalUrls()

Get scanned external URLs aggregated by host.

public getScannedExternalUrls() : array<string|int, mixed>

Attention: This query is cached to a transient as it is very expensive! Use delete_transient(Query::TRANSIENT_SCANNED_EXTERNAL_URLS) to invalidate the cache.

Return values
array<string|int, mixed>

getScannedSourceUrls()

Get all (known) scanned pages.

public getScannedSourceUrls() : mixed

getScannedTemplates()

Get a list of scanned templates.

public getScannedTemplates([bool|string $forceTemplatesInvalidate = false ]) : mixed
Parameters
$forceTemplatesInvalidate : bool|string = false

See ServiceCloudConsumer#retrieveBy parameters

getScannedTemplateStats()

Get scanned templates with details about the amount of found times, and the last scanned.

public getScannedTemplateStats() : mixed

This does not return template-instances, for this you need to use getScannedTemplates.

removeSourceUrls()

Remove scanned entries by source urls. This can be useful if you know a page got deleted.

public removeSourceUrls(array<string|int, string> $urls) : int
Parameters
$urls : array<string|int, string>
Return values
int

revisionCurrent()

Provide a count for all scan results.

public revisionCurrent(array<string|int, mixed> $revision) : mixed
Parameters
$revision : array<string|int, mixed>

checkIfMarkupIsBlocked()

Check server-side via PHP if the markup got blocked by an existing content blocker.

protected checkIfMarkupIsBlocked(array<string|int, int> $ids, array<string|int, mixed> &$result) : mixed
Parameters
$ids : array<string|int, int>
$result : array<string|int, mixed>

getExistingUrlExpressions()

Calculate all existing expressions for blocked URLs.

protected getExistingUrlExpressions() : mixed

transformExpressionsToMySQL()

Transform a set of expression strings to a valid SQL statement. The regular expressions are combined with `OR` so you can check e.g. an URL column if it matches.

protected transformExpressionsToMySQL(array<string|int, string> $expressions, string $column) : mixed
Parameters
$expressions : array<string|int, string>
$column : string

        
On this page

Search results