Read from the package's own PHP files at the commit d94cf01a71de: its namespaces, classes, interfaces and enums, their public constants, properties and methods with their PHPDoc, and the options its factories take. Nothing of it is run.
ConsentBundleclassThe name the sites register (config/bundles.php) and omnibase's bundle scan reads (a class Base\<Name>\<Name>Bundle, its folder src/): the bundle itself is Base\Consent\Bridge\Symfony\ConsentBundle, since step C8 of the plan "omnibase agnostique".
1 method
ConsentConfigclassA site's `consent:` configuration made whole without Symfony's Config component: what Bridge\Symfony\DependencyInjection\ConsentConfiguration gives the panel under Symfony - every key with its default, a feature written `NAME: ~` or `NAME: false` made an entry, each storage entry written as a name made whole - for a framework that has none of it (Laravel: omnibridge/laravel builds the panel from the Symfony site's config/packages/consent.yaml). The defaults are this class's, and the configuration tree takes them from here (audit "lesringostars face au master plan", R24: formerly the Laravel twin's own copy).
1 method · 4 constants
ConsentPanelclassThe cookie answer itself, without the framework (plan "omnibase agnostique", step C8): the features the visitor answers for and what each keeps, the countdown, the privacy page's address, in the visitor's words.
5 methods · 1 constant
ConsentBundleclassThe cookie answer shared by the omnibase sites, under Symfony: a Twig partial (@Consent/_cookie.html.twig), its script and its stylesheet (bundles/consent/), and the `consent:` configuration. The answer itself (Base\Consent\ConsentPanel) and its Twig functions (Bridge\Twig) load without the framework (tests/Fondation.php, plan "omnibase agnostique", step C8).
2 methods
Base\Consent\Bridge\Symfony\DependencyInjection
ConsentConfigurationclassThe site's `consent:` configuration under Symfony; its defaults are Base\Consent\ConsentConfig's, which makes the same configuration whole without Symfony (a framework other than Symfony reads the site's file).
1 method
ConsentExtensionclass2 methods
Base\Consent\Bridge\Symfony\Twig
ConsentExtensionclassThe partial's functions under Symfony (the service the bundle registers, known to the sites as Base\Consent\Twig\ConsentExtension): the panel built from the container - the site's `consent:` configuration and the bundle's features, the translator, omnibase's router for the privacy page, the main request's session for its cookie's name.
1 method
ConsentExtensionclassThe partial's two functions over a ConsentPanel, in any Twig environment: consent_options(), what the partial prints (the features and their switches, the countdown, the privacy page's URL), and consent_settings(), the same as the configuration @glitchr/flowjs/cookie reads (JSON, safe in a <script type="application/json">). Twig and the panel, nothing else: a framework other than Symfony builds the panel and adds this extension.
6 methods · 1 constant
Base\Consent
ConsentBundle class
class ConsentBundle extends ConsentBundle ConsentBundle.php:13
The name the sites register (config/bundles.php) and omnibase's bundle scan reads (a class Base\<Name>\<Name>Bundle, its folder src/): the bundle itself is Base\Consent\Bridge\Symfony\ConsentBundle, since step C8 of the plan "omnibase agnostique".
ConsentBundle::__construct()
public function __construct()ConsentConfig class
final class ConsentConfig ConsentConfig.php:20
A site's consent: configuration made whole without Symfony's Config
component: what Bridge\Symfony\DependencyInjection\ConsentConfiguration
gives the panel under Symfony - every key with its default, a feature
written NAME: ~ or NAME: false made an entry, each storage entry
written as a name made whole - for a framework that has none of it
(Laravel: omnibridge/laravel builds the panel from the Symfony site's
config/packages/consent.yaml). The defaults are this class's, and the
configuration tree takes them from here (audit "lesringostars face au
master plan", R24: formerly the Laravel twin's own copy).
One configuration, as written (the consent key of the YAML); the
validation of the tree (an unknown key, a countdown below 0...) is the
Symfony site's.
const DEFAULTS = ['groups' => ['USER'], 'defaults' => true, 'version' => null, 'lifetime' => '180d', 'countdown' => 10, 'countdown_action' => 'default', 'dismiss' => 'none', …The configuration's keys, in the tree's order, with their defaults.
const SIGNALS = ['gpc' => false, 'dnt' => false]The privacy signals of the browser, none honoured by default.
const FEATURE = ['implicit' => null, 'required' => null, 'on_demand' => null, 'inherits' => null, 'erase' => [], 'storage' => []]A feature's keys, in the tree's order, with their defaults (
enabledaside).const STORAGE = ['type' => 'cookie', 'duration' => null, 'purpose' => null, 'path' => null, 'domain' => null]A storage entry's keys, in the tree's order, with their defaults (
nameaside).
ConsentConfig::normalize()
public static function normalize(array $site): array$sitethe site's
consent:configuration- Returns
what the tree gives: the keys written first, in their order, then those left unsaid with their defaults, in the tree's order
ConsentPanel class
class ConsentPanel ConsentPanel.php:26
The cookie answer itself, without the framework (plan "omnibase agnostique", step C8): the features the visitor answers for and what each keeps, the countdown, the privacy page's address, in the visitor's words.
options(): what the partial prints - the features and their switches, the countdown, the privacy page's URL. settings(): the same, as the configuration @glitchr/flowjs/cookie reads (JSON, json()): the features are its categories, with what each stores.
Plain PHP: the site's configuration, a translator (symfony/translation's contract; the catalogue's names when it is also a TranslatorBagInterface), and two closures for what the framework knows - a route's address, the session's name. The Twig functions are Bridge\Twig\ConsentExtension's; under Symfony, Bridge\Symfony\Twig\ConsentExtension builds this from the container (Base\Consent\Twig\ConsentExtension, the name the sites know).
const IGNORE = ['[data-consent-ignore]', '[data-cookie-ignore]', '.sf-toolbar', '[id^="sfwdt"]', '[id^="sfToolbar"]', '.sf-dump']What is not the page's: a click there neither answers the question (dismiss) nor closes the panel - Symfony's web debug toolbar (.sf-toolbar, open or folded, around sfwdt<token> and its sfToolbar* parts), a dump() printed in the page, and what a site marks with data-consent-ignore (or the library's data-cookie-ignore).
ConsentPanel::__construct()
public function __construct(readonly array $config, readonly TranslatorInterface $translator, readonly array $defaults = [], readonly ?\Closure $urls = null, readonly ?\Closure $session = null)$configthe site's consent: configuration (as ConsentConfiguration processes it)
$translatorthe consent domain's words in the visitor's language
$defaultsthe bundle's own features (self::features(), config/features.php)
$urlsa route's address: the privacy page's (consent.privacy_route); none, no link
$sessionthe session cookie's name; none (or null), PHP's own
ConsentPanel::features()
public static function features(): arrayThe features every site starts from (consent.defaults: true), in the shape of consent.features: config/features.php, the bundle's own list.
ConsentPanel::options()
public function options(): arrayThe site's own groups and the features it declares itself, as the partial has always handed them (data-consent-features): what a page whose scripts are from before @glitchr/flowjs/cookie still reads.
ConsentPanel::settings()
public function settings(): arrayThe configuration of @glitchr/flowjs/cookie: every feature a category (the bundle's own under the site's), its words in the visitor's language, what it stores; the countdown, the answer's lifetime, the privacy signals; and, under "consent", what the bundle's own script reads (the site's own feature, the features split from another, the durations in words).
ConsentPanel::json()
public function json(): stringsettings(), for a <script type="application/json">: no "<" left to end the script with.
Base\Consent\Bridge\Symfony
ConsentBundle class
class ConsentBundle extends AbstractBaseBundle ConsentBundle.php:19
The cookie answer shared by the omnibase sites, under Symfony: a Twig
partial (@Consent/_cookie.html.twig), its script and its stylesheet
(bundles/consent/), and the consent: configuration. The answer itself
(Base\Consent\ConsentPanel) and its Twig functions (Bridge\Twig) load
without the framework (tests/Fondation.php, plan "omnibase agnostique",
step C8).
Sites register it as Base\Consent\ConsentBundle, the subclass that keeps that name.
ConsentBundle::__construct()
public function __construct()ConsentBundle::getPath()
public function getPath(): stringModern layout: the bundle root is the package root (templates/, public/, translations/).
Base\Consent\Bridge\Symfony\DependencyInjection
ConsentConfiguration class
class ConsentConfiguration extends AbstractBaseConfiguration ConsentConfiguration.php:14
The site's consent: configuration under Symfony; its defaults are
Base\Consent\ConsentConfig's, which makes the same configuration whole
without Symfony (a framework other than Symfony reads the site's file).
ConsentConfiguration::getConfigTreeBuilder()
public function getConfigTreeBuilder(): TreeBuilderConsentExtension class
class ConsentExtension extends AbstractBaseExtension ConsentExtension.php:12
ConsentExtension::getConfiguration()
public function getConfiguration(array $config, ContainerBuilder $container): ConsentConfigurationConsentExtension::load()
public function load(array $configs, ContainerBuilder $container): voidBase\Consent\Bridge\Symfony\Twig
ConsentExtension class
class ConsentExtension extends TwigConsentExtension ConsentExtension.php:19
The partial's functions under Symfony (the service the bundle registers,
known to the sites as Base\Consent\Twig\ConsentExtension): the panel built
from the container - the site's consent: configuration and the bundle's
features, the translator, omnibase's router for the privacy page, the main
request's session for its cookie's name.
ConsentExtension::__construct()
public function __construct(array $config, UrlGeneratorInterface $urls, TranslatorInterface $translator, array $defaults = [], ?RequestStack $requests = null)$configthe site's consent: configuration
$defaultsthe bundle's own features (config/features.php)
Base\Consent\Bridge\Twig
ConsentExtension class
class ConsentExtension extends AbstractExtension ConsentExtension.php:17
The partial's two functions over a ConsentPanel, in any Twig environment: consent_options(), what the partial prints (the features and their switches, the countdown, the privacy page's URL), and consent_settings(), the same as the configuration @glitchr/flowjs/cookie reads (JSON, safe in a <script type="application/json">). Twig and the panel, nothing else: a framework other than Symfony builds the panel and adds this extension.
const IGNORE = ConsentPanel::IGNOREWhat is not the page's (ConsentPanel::IGNORE).
ConsentExtension::__construct()
public function __construct(protected readonly ConsentPanel $panel)ConsentExtension::getFunctions()
public function getFunctions(): arrayConsentExtension::panel()
public function panel(): ConsentPanelConsentExtension::options()
public function options(): array- Returns
see ConsentPanel::options()
ConsentExtension::settings()
public function settings(): array- Returns
see ConsentPanel::settings()
ConsentExtension::json()
public function json(): string