Documentation

Query extends AbstractGvlPersistance
in package

Query the database for purposes, functions and vendors.

They are strictly typed to this format: https://git.io/JqfCq

Table of Contents

Properties

$latestVersions  : array<string|int, int>
Cache of `getLatestVersions()`.
$normalizer  : TcfVendorListNormalizer
The normalizer.

Methods

__construct()  : mixed
C'tor.
allDeclarations()  : mixed
Query all available declaration of the latest GVL and TCF policy version for the current language. If the language does not exist for the current TCF version, let's fallback to the default TCF version.
declaration()  : array<string|int, mixed>
Query available declaration of the latest GVL and TCF policy version for the current language. If the language does not exist for the current TCF version, let's fallback to the default TCF version.
getCurrentLanguage()  : string
Get the language which is used for the GVL. It needs to be a two-letter ISO code, see also `self::fourLetterLanguageCodeToTwoLetterCode()`.
getLatestVersions()  : array<string|int, int>
Get the latest GVL, TCF Policy and vendor list versions.
getNormalizer()  : mixed
Getter.
hasDefectVendors()  : mixed
Check if a vendor is corrupt. This can happen when:
invalidateCaches()  : mixed
When the TCF got updated, invalidate the caches for our next query.
stacks()  : array<string|int, mixed>
Query available stacks of the latest GVL and TCF policy version for the current language. If the language does not exist for the current TCF version, let's fallback to the default TCF version.
vendor()  : array<string|int, mixed>
Query a vendor.
vendors()  : array<string|int, array<string|int, mixed>>
Fetch a list of vendors by arguments and return an array of vendors matching the schema of the official `vendor-list.json`.
castReadDeclaration()  : mixed
Cast the read purposes to valid scheme objects.
castReadStacks()  : mixed
Cast the read stacks to valid scheme objects.
castReadVendors()  : mixed
Cast the read vendors to valid scheme objects.

Properties

$latestVersions

Cache of `getLatestVersions()`.

private array<string|int, int> $latestVersions

Methods

allDeclarations()

Query all available declaration of the latest GVL and TCF policy version for the current language. If the language does not exist for the current TCF version, let's fallback to the default TCF version.

public allDeclarations([mixed $args = [] ]) : mixed

Additional arguments:

  • [onlyReturnDeclarations]: (boolean) Default to false, do not populate gvlSpecificationVersion, ...
Parameters
$args : mixed = []

Additional arguments, see description of purposes

declaration()

Query available declaration of the latest GVL and TCF policy version for the current language. If the language does not exist for the current TCF version, let's fallback to the default TCF version.

public declaration(string $type[, array<string|int, mixed> $args = [] ]) : array<string|int, mixed>

A declaration can be purpose, features, special features and special purposes.

Arguments:

  • [gvlSpecificationVersion]: (int) Default to latest
  • [tcfPolicyVersion]: (int) Default to latest
  • [language]: (string) Default to current
Parameters
$type : string

See StackCalculator::DECLARATION_TYPE_* constants.

$args : array<string|int, mixed> = []

Additional arguments, see description

Return values
array<string|int, mixed>

getCurrentLanguage()

Get the language which is used for the GVL. It needs to be a two-letter ISO code, see also `self::fourLetterLanguageCodeToTwoLetterCode()`.

public getCurrentLanguage() : string
Return values
string

getLatestVersions()

Get the latest GVL, TCF Policy and vendor list versions.

public getLatestVersions() : array<string|int, int>
Return values
array<string|int, int>

getNormalizer()

Getter.

public getNormalizer() : mixed
Tags
codeCoverageIgnore

hasDefectVendors()

Check if a vendor is corrupt. This can happen when:

public hasDefectVendors([array<string|int, mixed> $args = [] ]) : mixed
  • deviceStorageDisclosureUrl is set, but deviceStorageDisclosure isn't

Arguments:

  • [in]: (int[]) Only read this vendors (WHERE IN)
  • [vendorListVersion]: (int) Default to latest
Parameters
$args : array<string|int, mixed> = []

Additional arguments, see description

invalidateCaches()

When the TCF got updated, invalidate the caches for our next query.

public invalidateCaches() : mixed

stacks()

Query available stacks of the latest GVL and TCF policy version for the current language. If the language does not exist for the current TCF version, let's fallback to the default TCF version.

public stacks([mixed $args = [] ]) : array<string|int, mixed>

Arguments:

  • [gvlSpecificationVersion]: (int) Default to latest
  • [tcfPolicyVersion]: (int) Default to latest
  • [language]: (string) Default to current
Parameters
$args : mixed = []

Additional arguments, see description

Return values
array<string|int, mixed>

vendor()

Query a vendor.

public vendor(int $vendorId[, array<string|int, mixed> $args = [] ]) : array<string|int, mixed>

Arguments:

  • [vendorListVersion]: (int) Default to latest
  • [gvlSpecificationVersion]: (int) Default to latest
  • [tcfPolicyVersion]: (int) Default to latest
Parameters
$vendorId : int
$args : array<string|int, mixed> = []

Additional arguments, see description

Return values
array<string|int, mixed>

vendors()

Fetch a list of vendors by arguments and return an array of vendors matching the schema of the official `vendor-list.json`.

public vendors([mixed $args = [] ]) : array<string|int, array<string|int, mixed>>

Arguments:

  • [in]: (int[]) Only read this vendors (WHERE IN)
  • [gvlSpecificationVersion]: (int) Default to latest
  • [tcfPolicyVersion]: (int) Default to latest
  • [vendorListVersion]: (int) Default to latest
  • [language]: (string) Default to current
Parameters
$args : mixed = []
Return values
array<string|int, array<string|int, mixed>>

castReadDeclaration()

Cast the read purposes to valid scheme objects.

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

castReadStacks()

Cast the read stacks to valid scheme objects.

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

castReadVendors()

Cast the read vendors to valid scheme objects.

protected castReadVendors(array<string|int, mixed> $rows, array<string|int, mixed> $args) : mixed
Parameters
$rows : array<string|int, mixed>
$args : array<string|int, mixed>

        
On this page

Search results