Constants

TABLE_NAME

TABLE_NAME ='tcf'

TABLE_NAME_VENDORS

TABLE_NAME_VENDORS ='vendors'

TABLE_NAME_STACKS

TABLE_NAME_STACKS ='stacks'

DECLARATION_TYPE_PURPOSES

DECLARATION_TYPE_PURPOSES ='purposes'

DECLARATION_TYPE_SPECIAL_PURPOSES

DECLARATION_TYPE_SPECIAL_PURPOSES ='specialPurposes'

DECLARATION_TYPE_FEATURES

DECLARATION_TYPE_FEATURES ='features'

DECLARATION_TYPE_SPECIAL_FEATURES

DECLARATION_TYPE_SPECIAL_FEATURES ='specialFeatures'

DECLARATION_TYPES

DECLARATION_TYPES =array(self::DECLARATION_TYPE_PURPOSES, self::DECLARATION_TYPE_SPECIAL_PURPOSES, self::DECLARATION_TYPE_FEATURES, self::DECLARATION_TYPE_SPECIAL_FEATURES)

DECLARATION_OVERWRITE_FIELDS

DECLARATION_OVERWRITE_FIELDS =array('name', 'description', 'descriptionLegal')

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

VENDOR_OVERWRITE_FIELDS

VENDOR_OVERWRITE_FIELDS =array('name', 'purposes', 'legIntPurposes', 'flexiblePurposes', 'specialPurposes', 'features', 'specialFeatures', 'policyUrl', 'usesCookies', 'cookieMaxAgeSeconds', 'cookieRefresh', 'usesNonCookieAccess', 'deviceStorageDisclosureUrl', 'deviceStorageDisclosureViolation', 'deviceStorageDisclosure', 'additionalInformation')

STACKS_OVERWRITE_FIELDS

STACKS_OVERWRITE_FIELDS =array('name', 'description', 'descriptionLegal', 'purposes', 'specialFeatures')

Properties

Methods

clear()

clear()

Clear all the database tables.

normalizeVendors()

normalizeVendors(array  $vendorList)

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

This function does not persist purposes and features!

Parameters

array $vendorList

Passed as reference to avoid memory leaks

normalizeDeclarations()

normalizeDeclarations(string  $language,array  $vendorList,array  $translation)

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

This function does not persist vendors!

Parameters

string $language
array $vendorList

Passed as reference to avoid memory leaks

array $translation

Passed as reference to avoid memory leaks

normalizeStacks()

normalizeStacks(string  $language,array  $vendorList,array  $translation)

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

Parameters

string $language
array $vendorList

Passed as reference to avoid memory leaks

array $translation

Passed as reference to avoid memory leaks

getNormalizer()

getNormalizer()

Getter.

persistDeclaration()

persistDeclaration(string  $declarationType,array<mixed,string>  $rows)

Persist an array of rows to the database.

Parameters

string $declarationType

See self::DECLARATION_TYPES

array<mixed,string> $rows

persistVendors()

persistVendors(array<mixed,string>  $rows)

Persist an array of rows to the database.

Parameters

array<mixed,string> $rows

persistStacks()

persistStacks(array<mixed,string>  $rows)

Persist an array of rows to the database.

Parameters

array<mixed,string> $rows