Persist
in package
Uses
UtilsProvider
Persist multiple `ScanEntry`'s from the `Scanner` results to the database.
It also provides functionality to avoid duplicate found templates (e.g. MonsterInsights over Google Analytics), and deduplicate coexisting templates (e.g. CF7 with reCaptcha over Google reCaptcha).
Table of Contents
Constants
- DECLARATION_OVERWRITE_FIELDS = ['post_id', 'markup_hash']
- Fields which should be updated via `ON DUPLICATE KEY UPDATE`.
- TABLE_NAME = 'scan'
- TABLE_NAME_MARKUP = 'scan_markup'
Properties
- $entries : mixed
Methods
- __construct() : mixed
- C'tor.
- getEntries() : mixed
- Get the persistable entries.
- getPluginConstantPrefix() : string
- Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
- persist() : mixed
- Insert entries to database.
Constants
DECLARATION_OVERWRITE_FIELDS
Fields which should be updated via `ON DUPLICATE KEY UPDATE`.
public
mixed
DECLARATION_OVERWRITE_FIELDS
= ['post_id', 'markup_hash']
TABLE_NAME
public
mixed
TABLE_NAME
= 'scan'
TABLE_NAME_MARKUP
public
mixed
TABLE_NAME_MARKUP
= 'scan_markup'
Properties
$entries
private
mixed
$entries
Methods
__construct()
C'tor.
public
__construct(array<string|int, ScanEntry> $entries) : mixed
Parameters
- $entries : array<string|int, ScanEntry>
Tags
getEntries()
Get the persistable entries.
public
getEntries() : mixed
Tags
getPluginConstantPrefix()
Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
public
getPluginConstantPrefix() : string
Tags
Return values
stringpersist()
Insert entries to database.
public
persist() : mixed