Documentation

TcfVendorListNormalizer
in package

Factory to prepare installation of database tables, provide a downloader and normalize automatically to database.

Table of Contents

Properties

$compLanguage  : AbstractLanguagePlugin
See AbstractLanguagePlugin;
$dbPrefix  : mixed
$endpoint  : mixed
$fetchQueryArgs  : mixed
$query  : Query
Query instance.

Methods

__construct()  : mixed
C'tor.
clear()  : mixed
Clear all the database tables.
dbDelta()  : mixed
Make sure the database tables are created.
getCompLanguage()  : mixed
Getter.
getEndpoint()  : mixed
Getter.
getFetchQueryArgs()  : mixed
Getter.
getQuery()  : mixed
Getter.
getTableName()  : mixed
Getter.
setFetchQueryArgs()  : mixed
Setter.
uncamelize()  : mixed
Uncamlize a given string. Useful to map purpose types to table names e.g. `specialPurposes` -> `special_purposes`.
update()  : WP_Error|true
Update the vendor list in database (fetch vendor list + translations and persist).
init()  : mixed
Initialize the factory with further classes.
updateLanguage()  : mixed
Update a specific language (skips default TCF language). Do not use this, use `update` instead.

Properties

Methods

__construct()

C'tor.

public __construct(string $dbPrefix, string $endpoint[, AbstractLanguagePlugin $compLanguage = null ][, array<string|int, mixed> $fetchQueryArgs = [] ]) : mixed
Parameters
$dbPrefix : string

Prefix for the database table to keep isolated per-plugin

$endpoint : string

The endpoint where vendor-list.json and purposes-de.json can be appended

$compLanguage : AbstractLanguagePlugin = null
$fetchQueryArgs : array<string|int, mixed> = []

Additional query parameters, e.g. license key

getTableName()

Getter.

public getTableName([string $name = null ]) : mixed
Parameters
$name : string = null

setFetchQueryArgs()

Setter.

public setFetchQueryArgs(array<string|int, mixed> $fetchQueryArgs) : mixed
Parameters
$fetchQueryArgs : array<string|int, mixed>
Tags
codeCoverageIgnore

update()

Update the vendor list in database (fetch vendor list + translations and persist).

public update() : WP_Error|true
Return values
WP_Error|true

updateLanguage()

Update a specific language (skips default TCF language). Do not use this, use `update` instead.

protected updateLanguage(string $locale, Persist $persist) : mixed
Parameters
$locale : string
$persist : Persist

        
On this page

Search results