Documentation

Persist
in package

Persist an array of `vendor-list.json` to the database.

Table of Contents

Constants

DECLARATION_OVERWRITE_FIELDS  = ['name', 'description', 'illustrations']
Fields which should be updated via `ON DUPLICATE KEY UPDATE`.
STACKS_OVERWRITE_FIELDS  = ['name', 'description', 'purposes', 'specialFeatures']
TABLE_NAME  = 'tcf'
TABLE_NAME_STACKS  = 'stacks'
TABLE_NAME_VENDORS  = 'vendors'
VENDOR_OVERWRITE_FIELDS  = ['name', 'purposes', 'legIntPurposes', 'flexiblePurposes', 'specialPurposes', 'features', 'specialFeatures', 'usesCookies', 'cookieMaxAgeSeconds', 'cookieRefresh', 'usesNonCookieAccess', 'deviceStorageDisclosureUrl', 'deviceStorageDisclosureViolation', 'deviceStorageDisclosure', 'additionalInformation', 'dataRetention', 'dataDeclaration', 'urls']

Properties

$normalizer  : TcfVendorListNormalizer
The normalizer.

Methods

__construct()  : mixed
C'tor.
clear()  : mixed
Clear all the database tables.
getNormalizer()  : mixed
Getter.
normalizeDeclarations()  : mixed
Parse `vendor-list.json`, normalize purposes and features and push it up to the database.
normalizeStacks()  : mixed
Parse `vendor-list.json`, normalize stacks and push it up to the database.
normalizeVendors()  : mixed
Parse `vendor-list.json`, normalize vendors and push it up to the database.
persistDeclaration()  : mixed
Persist an array of rows to the database.
persistStacks()  : mixed
Persist an array of rows to the database.
persistVendors()  : mixed
Persist an array of rows to the database.

Constants

DECLARATION_OVERWRITE_FIELDS

Fields which should be updated via `ON DUPLICATE KEY UPDATE`.

public mixed DECLARATION_OVERWRITE_FIELDS = ['name', 'description', 'illustrations']

STACKS_OVERWRITE_FIELDS

public mixed STACKS_OVERWRITE_FIELDS = ['name', 'description', 'purposes', 'specialFeatures']

TABLE_NAME

public mixed TABLE_NAME = 'tcf'

TABLE_NAME_STACKS

public mixed TABLE_NAME_STACKS = 'stacks'

TABLE_NAME_VENDORS

public mixed TABLE_NAME_VENDORS = 'vendors'

VENDOR_OVERWRITE_FIELDS

public mixed VENDOR_OVERWRITE_FIELDS = ['name', 'purposes', 'legIntPurposes', 'flexiblePurposes', 'specialPurposes', 'features', 'specialFeatures', 'usesCookies', 'cookieMaxAgeSeconds', 'cookieRefresh', 'usesNonCookieAccess', 'deviceStorageDisclosureUrl', 'deviceStorageDisclosureViolation', 'deviceStorageDisclosure', 'additionalInformation', 'dataRetention', 'dataDeclaration', 'urls']

Properties

Methods

clear()

Clear all the database tables.

public clear() : mixed

getNormalizer()

Getter.

public getNormalizer() : mixed
Tags
codeCoverageIgnore

normalizeDeclarations()

Parse `vendor-list.json`, normalize purposes and features and push it up to the database.

public normalizeDeclarations(string $language, array<string|int, mixed> &$vendorList, array<string|int, mixed> &$translation) : mixed

This function does not persist vendors!

Parameters
$language : string
$vendorList : array<string|int, mixed>

Passed as reference to avoid memory leaks

$translation : array<string|int, mixed>

Passed as reference to avoid memory leaks

normalizeStacks()

Parse `vendor-list.json`, normalize stacks and push it up to the database.

public normalizeStacks(string $language, array<string|int, mixed> &$vendorList, array<string|int, mixed> &$translation) : mixed
Parameters
$language : string
$vendorList : array<string|int, mixed>

Passed as reference to avoid memory leaks

$translation : array<string|int, mixed>

Passed as reference to avoid memory leaks

normalizeVendors()

Parse `vendor-list.json`, normalize vendors and push it up to the database.

public normalizeVendors(array<string|int, mixed> &$vendorList) : mixed

This function does not persist purposes and features!

Parameters
$vendorList : array<string|int, mixed>

Passed as reference to avoid memory leaks

persistDeclaration()

Persist an array of rows to the database.

protected persistDeclaration(string $declarationType, array<string|int, string> &$rows) : mixed
Parameters
$declarationType : string

See StackCalculator::DECLARATION_TYPES

$rows : array<string|int, string>

persistStacks()

Persist an array of rows to the database.

protected persistStacks(array<string|int, string> &$rows) : mixed
Parameters
$rows : array<string|int, string>

persistVendors()

Persist an array of rows to the database.

protected persistVendors(array<string|int, string> &$rows) : mixed
Parameters
$rows : array<string|int, string>

        
On this page

Search results