Lue dans les fichiers PHP du paquet au commit 77de4a484a1f : ses espaces de noms, classes, interfaces et énumérations, leurs constantes, propriétés et méthodes publiques avec leur PHPDoc, et les options que prennent ses fabriques. Rien n’en est exécuté.
CatalogueTranslationsclassMessages from omnibase's ICU catalogues (<domain>+intl-icu.<locale>.yaml, or <domain>.<locale>.yaml) in the folders given - the core's, the bundles', the site's last so that its own words win - read by Symfony's Translation component (a library, not the framework), so that Laravel says the same words as Symfony.
5 methods
OmnibridgeServiceProviderclassomnisense/omnibase hosted by Laravel: each contract of its Foundation bound to Laravel's services under the contract's interface, and the Foundation's registry (Base\Contract\Runtime, omnisense/omnibridge's Omnibridge\Runtime) on Laravel's container, so that Runtime::urls(), ::parameters()... and app(Urls::class) are one object.
2 methods
RouterUrlGeneratorclassSymfony's URL generator interface over the Urls contract, for a library that asks for one (omnibase/consent's extension): an absolute URL is Urls::url(), any other reference type Urls::path().
4 methods
RouterUrlsclassAddresses answered by Laravel: a route by its name through Laravel's router, relative (path()) or whole (url()); a public file by its path, through the asset manifest of a build when one is given (a webpack or Vite manifest: "./fonts/RobotoSlab-Bold.woff2" is "/assets/fonts/RobotoSlab-Bold.9d4f57b2.woff2"), else as it is.
7 methods
AccountUserclassAn account as Laravel's guard holds it (plan "omniauth", §3.2): the application's own object (omnibase's user, which implements nothing of Laravel) wrapped for the Authenticatable contract - its identifier the handle omniauth's Accounts give it, its password the hash, no remember token (the remember-me cookie is signed, RememberMe). The contracts an application reads the visitor through (Omnibridge\Contract\Access::getUser(), the screens' viewer, Twig's app.user) unwrap it: the code of the application sees the same object under both hosts.
12 methods · 4 properties
AuthServiceProviderclassomniauth wired into a Laravel application (plan "omniauth", §3.2, step AU8), from config/omniauth.php - registered by OmnibridgeServiceProvider when config/omnibridge.php says 'auth' => true and omnisense/omniauth is installed; nothing of Auth\ without both.
3 methods · 3 constants
Contextsclassomniauth's Context of a Laravel request: its origin and host (WebAuthn's), the visitor's address and browser, the trusted_device cookie (read as the Symfony site wrote it: left out of Laravel's encrypted cookies), and the firewall - the "fwl" claim of the trusted devices' tokens, "main" unless config/omniauth.php's trusted_device.firewall says otherwise: the name scheb/2fa gave the Symfony firewall that asked the second factor, so the devices it trusted are trusted here.
2 methods
OAuthProvidersclassomniauth's identity providers from config/omniauth.php: Providers::configured() through the provider packages' factories (omniauth/google's GoogleFactory; a provider without client id is not served), and a provider given as a binding ("service") as it is.
1 method
OmniauthGuardclassLaravel's guard over omniauth (plan "omniauth", §3.2; config/auth.php: driver "omniauth"): the session keeps the handle of the account signed in, user() reads the account back through omniauth's Accounts at each request (as Security's user provider refreshes it), wrapped for Laravel (AccountUser); a sign-in renews the session's id and sets the signed remember-me cookie when asked (RememberMe); a sign-out forgets both and omniauth's attempt.
17 methods · 1 constant
OmniauthUserProviderclassLaravel's user provider over omniauth's stores (config/auth.php: driver "omniauth"): an account by its handle (retrieveById) or by what the person typed (retrieveByCredentials: identifier, email or username), its password checked by the hasher omniauth's PasswordMethod uses - symfony/password-hasher, so a password longer than 72 bytes verifies as under Symfony - and rehashed when that hasher says so. No remember token: the remember-me cookie is signed (RememberMe).
7 methods
OmnibaseEffectsclassWhat a sign-in does around omniauth under Symfony, done under Laravel by the same omnibase classes (plan "omniauth", step AU8b; R25 and R26 of the master plan's gaps) - each where its classes are there and the stores are omnibase's, as omnibase's config/services/auth.php wires them under Symfony:
7 methods · 9 constants
PagesclassThe sign-in's pages (the form, the second factor's, the sign-out's), rendered as any page of the application is: through the bound Base\Screen\Negotiation - the container's Twig by default, the application's own rendering (its page context, its layout) when it binds one. Never cached: they carry the session's tokens.
2 methods
RefusalclassA refused sign-in, as the page says it: the message's key and data (the template's `error.messageKey|trans(error.messageData, 'security')`, what Security's AuthenticationException gave omnibase's login page), omniauth's failure and reason. Kept in the session for the page that follows, as an array.
4 methods · 5 properties · 1 constant
RememberMeclassThe remember-me cookie (plan "omniauth", §1.9): the account's handle and the cookie's expiry, signed (HMAC-SHA256, the host's secret) with the account's password hash and address - Security's signature_properties ['password', 'email'] - so that a new password or a new address forgets every browser, as the Symfony site's remember-me does. No token is stored.
5 methods
RolesclassSecurity's attributes as abilities of Laravel's gate (Gate::before): a role ("ROLE_ADMIN") is granted to an account that holds it or one above it in the hierarchy (security.yaml's role_hierarchy), IS_AUTHENTICATED_FULLY to an account signed in by its proofs (not by its remember-me cookie), IS_AUTHENTICATED_REMEMBERED and IS_AUTHENTICATED to any account signed in, IS_AUTHENTICATED_2FA_IN_PROGRESS to the visitor between two factors (scheb/2fa's name), PUBLIC_ACCESS and IS_AUTHENTICATED_ANONYMOUSLY to everybody. Any other ability is left to the gate's own definitions.
3 methods
RoutesclassThe routes of omniauth's sign-in, at the addresses and under the names config/omniauth.php gives them - by default those the Symfony site has (omnibase's security_login, security_logout, security_logoutRequest, security_loginWithToken; scheb/2fa's 2fa_login and 2fa_login_check; the passkey's; each identity provider's oauth_<name> and oauth_<name>_check), so the pages and scripts that name them do not change. In the web group; the forms' tokens are omniauth's to check (the Tokens contract), not Laravel's CSRF middleware's, which reads another field (PreventRequestForgery in Laravel 13, ValidateCsrfToken in 12, VerifyCsrfToken before).
1 method · 1 constant
SessionStateclassomniauth's State under Laravel: the visitor's session (the request's store, started by the web group's StartSession). Without one - a command - nothing is kept.
4 methods
Settingsclassconfig/omniauth.php, resolved: what the guard, the controllers and the routes read (omnibridge/symfony's OmniauthExtension::runtime() under Symfony). Each method's key turns it on (null: off); the defaults are those of omniauth.yaml, so one site says the same thing under both hosts.
9 methods · 20 properties
Omnibridge\Laravel\Auth\Controllers
CeremonyclassThe steps of a sign-in that sign nobody in yet (Routes): the second factor's page, a passkey's request options, the trip out to an identity provider. The verifications themselves are Controllers\SignIn's.
5 methods · 1 constant
SignInclassEvery way omniauth signs in, under Laravel (plan "omniauth", §3.2; what omnibridge/symfony's OmniauthAuthenticator does under Symfony): the password form (its page too), the sign-in link, a passkey, the second factor's form, the return from an identity provider - each request turned into omniauth's Proof and Context, the forms' CSRF token checked through omnibridge's Tokens contract, Omniauth::verify() asked, and its Result answered:
11 methods · 7 constants
Omnibridge\Laravel\Auth\Listener
WelcomeFlashclassThe word of welcome a sign-in leaves for the next page (omnibase's SecuritySubscriber::onLoginSuccess() under Symfony, a "success" flash): for a verified account, "@notifications.login.success.<period>.<active>" - the period of the account's last activity (morning 05-10 h, afternoon 12-15 h, evening 19-05 h, day otherwise), "first" when that activity is not today's, "back" when it is ("Re-bonjour Marki !") -; for an account not yet saved, "@notifications.login.success.social". The period and the day are omnibase's own helpers (time_is_between(), daydiff(): the same answers as the Symfony site's, whatever they are); the account itself is the message's {0}, as omnibase's Notification gives it. Translated in the visitor's language (the Locales contract's), else the catalogues' default; a key the catalogues do not have - asked, or pointed to by an entry that is itself a key - is logged and flashed as nothing: a page never prints a key.
2 methods
Omnibridge\Laravel\Auth\Middleware
EnrolmentPromptclassThe second factor's enrolment a signed-in account is sent to (step R29 of the audit "lesringostars face au master plan"): omnibase's rule, Base\Auth\EnrolmentPrompt - the offer made once after a sign-in from an unknown browser (the session's flag the sign-in's WarnNewDevice sets), a second factor the administrator or a role requires and the account lacks until the session says "not now" -, as omnibase's SecurityEnrolmentSubscriber asks it under Symfony: a plain page asked is answered by a redirect to the enrolment page (user_settings_enrolment, omnibase's action), everything else goes on. Nothing where omnibase has no such rule, no SecurityPolicy is bound or no enrolment page is routed. Laravel has no impersonation.
2 methods · 5 constants
SecondFactorPendingclassBetween two factors, the second factor's page and nothing else (plan "omniauth", §3.2; omnibridge/symfony's SecondFactorGate under Symfony): a visitor whose attempt passed a first factor and waits for a second one is sent to the page from any other request - but the page itself, its check, the sign-out, and the routes config/omniauth.php's second_factor.open_routes names. Appended to the web group by the provider.
2 methods
AliasesclassThe services an application aliases by Symfony's #[AsAlias] (step R27 of the audit "lesringostars face au master plan"), bound in Laravel's container as Symfony's container aliases them: the interface the attribute names - or the class's one interface, when it names none - is the class. One declaration on the class, both hosts: an application no longer keeps a list of its bindings for Laravel.
3 methods · 1 constant
AppEnvironmentclassWhat the application runs as: Laravel's environment (APP_ENV), debug (app.debug) and key (app.key, the secret).
4 methods
AppLocalesclassThe site's languages in omnibase's form (fr-FR: language and country joined by a dash) over Laravel's locale (fr, or fr_FR): the request's is the site's language that Laravel's current locale names, the default the one configured (or the first), the default first among them all.
4 methods
DateClockclassPSR-20's clock on Laravel's dates: the time a test sets (Date::setTestNow(), $this->travel()) is this clock's too.
1 method
DiskFilesclassomnibase's storages as Laravel's disks: a storage ("local.uploads", "s3.private"...) is the disk the configuration maps it to (omnibridge.storages), else the disk of that name, else the default disk.
5 methods
DispatcherEventsclassPSR-14's dispatcher on Laravel's: an event object goes to the listeners of its class, and comes back.
2 methods
GateAccessclassWhat the visitor may do, answered by Laravel's gate: an attribute is an ability (a role the application defines as one, "ROLE_ADMIN", or a policy's "edit" on a Thread), allowed or not on the subject; the visitor is the default guard's user.
3 methods
GuardSessionsclassThe visitor's session ended by Laravel's guard: a user signed out when it is the one signed in (logout() forgets it and its remember-me cookie); false otherwise.
2 methods
RouterRoutesclassWhat Laravel's routes are beyond their addresses: the path a route is declared with ("/articles/{slug}"), the route an address leads to (GET), and its icons - none of Laravel's own: omnibase's #[Iconize] is read on Symfony's controllers; where the routes are also answered elsewhere (elsewhere()), a route's icons are the ones declared there.
5 methods
SessionTokensclassA form's token against cross-site requests: Laravel's session token, the one its CSRF middleware checks, and the same check (the token sent back equal to the session's, compared in constant time). Laravel has one token for every intent, so the intent is not part of it - by design, kept here: Symfony's per-intent tokens narrow what a token leaked from one form can post within the same session; both are bound to the session and renewed with it (the sign-in regenerates it), which is the protection against another site's request. A page then carries the same value for every intent (its forms, data-csrf, the X-CSRF-Token headers, the sign-out link).
3 methods
TransportMailerclasssymfony/mailer's MailerInterface on Laravel's mail: a message omnibase builds (a Symfony Email) sent by the default mailer's transport, which is Symfony's too.
2 methods
ConnectionsclassA Doctrine DBAL connection from one of Laravel's database connections (config/database.php): the same server, database and credentials, so that Doctrine (omnibridge/doctrine's entity manager) and Eloquent, if the application uses it, read the same tables.
2 methods
FormExtensionclassThe form functions of a page's templates under Laravel: form_start(), form_widget(), form_row(), form_label(), form_errors(), form_rest() and form_end() (Symfony's FormExtension) by FormRenderer, and form_proxy() / form_view() (omnibase's FormTwigExtension, its FormProxy: the forms every page carries) answered by the page's FormViews, by name (thread:searchbar).
3 methods
FormRendererclassform_start(), form_widget(), form_row(), form_label(), form_errors(), form_rest() and form_end() for the forms of FormView, with the markup omnibase's form theme gives them: inputs, a switch, a list of switches. Placeholders and labels are translated as Symfony's form theme translates them.
8 methods
FormViewclassA form as omnibase's templates read one (Symfony's FormView: its vars, its children by name), for the few forms its pages show on every page (omnibase's FormProxy: the search bar, the newsletter), printed with the markup of omnibase's form theme by FormRenderer. Only the view: what answers its submission is the application's.
8 methods · 4 properties
LocalizeclassThe page's language, chosen as omnibase's LocalizerSubscriber chooses it under Symfony: the visitor's choice (the LANG cookie SwitchLocale sets), else the browser's preferred language among the site's (omnibridge.locales.available), else the site's default (omnibridge.locales.default) - Laravel's locale, its language (fr); a route of one language is that language's. The language shown is remembered in LANG for the next page, as Symfony writes it (en-GB).
1 method · 1 constant
SwitchLocaleclassThe language menu's links (/locale/en: omnibase's _switch_locale), as omnibase's LocalizerController answers them under Symfony: the visitor's choice kept in the LANG cookie (Localize reads it) - a language of the site's (omnibridge.locales.available), written as Symfony names it (en_GB) -, then back to the page they came from on this site; none given, the choice forgotten; a language the site does not speak, the choice forgotten and the home.
1 method
LaravelMailerclasssymfony/mailer's MailerInterface over Laravel's mail (plan "omniauth", step AU8b; R26 of the master plan's gaps): an e-mail written as a Symfony Mime message (omnibase's Base\Notifier\Mail\EmailComposer) sent by the transport of one of config/mail.php's mailers - Laravel's mail is Symfony's Mailer, its SMTP, log or array transport the same objects.
2 methods
MapServiceProviderclassomnisense/omnimap wired into a Laravel application, from config/omnimap.php - the keys of omnibridge/symfony's omnimap.yaml (cache.pool a store of Laravel's cache; the routes but the tile's are the application's):
4 methods · 3 constants
TileControllerclassA tile of a map's picture kept in omnimap's cache (MapServiceProvider's tile route), as omnibridge/symfony's SnapshotController serves it: as WebP when the route's path ends in .webp (fitted within cache.public_size; GD with WebP, else Imagick, else as kept), public and cacheable (cache.max_age); with cache.public_directory, written there too at the route's own path, so that the web server serves it without PHP the next time.
2 methods · 1 constant
DiskStoragesclassomnibase's storages by name (local.cache, local.uploads...) as Laravel's disks, for Base\Service\Flysystem (audit "lesringostars face au master plan", R6): a PSR-11 container of each disk's Flysystem operator - the disk omnibridge.storages names for a storage, else the disk of the same name. A local disk is omnibase's local storage (its root, its files).
4 methods
ImageControllerclassomnibase's image route under Laravel (audit "lesringostars face au master plan", R6): each route of Base\Service\ImageRoute::ROUTES, declared under its name, is answered by ImageRoute's action for it - the route's parameters (data, identifier, extension) given by name, the cacheless routes without the local cache. The answer is ImageRoute's HttpFoundation response, which Laravel sends as it is; an image that does not resolve is its NotFoundHttpException, a 404.
2 methods
LaravelMediaRouterclassBase\Contract\MediaRouter over Laravel's router (audit "lesringostars face au master plan", R6): what omnibase's MediaService asks a router, for the image routes this package declares under their Symfony names (Base\Service\ImageRoute::ROUTES) - a named route's address, the route and parameters an address matches, a public file's address (the Urls contract's asset()).
6 methods
ServiceMediaclassomnibase's Media contract under Laravel (audit "lesringostars face au master plan", R6): MediaService's answers, as Base\Bridge\Symfony\ServiceMedia gives them under Symfony - the extension of a file, the image route's obfuscated data, the route's address -, MediaService built on Laravel's router (LaravelMediaRouter).
4 methods
AppVariableclassThe app variable of omnibase's templates, in Laravel: the request (its language, its address, its headers and attributes, as Symfony's Request names them), the visitor (the account signed in, the application's own object, as Symfony's app.user; none by default), the session, the site, the theme, the referrer (omnibase's app.referrer, an object printed as the page the visitor came from on this site, or as nothing: Page\Referrer), and the application's app.admin when it gives one (omnibase's AdminVariable: the back-office address of a record, app.admin.crudify(entity)).
3 methods · 7 properties
BagclassA bag read by a closure, with the words of Symfony's ParameterBag and FlashBag: get(key, default) and all().
3 methods
Referrerclassapp.referrer as omnibase's templates read it (omnibase's ReferrerInterface under Symfony): the page the visitor came from on this site, null for another site or none; printed as that address, or as nothing.
4 methods
RequestViewclassapp.request with the words of Symfony's Request: getLocale(), uri, headers.get(), attributes.get('_route').
4 methods · 2 properties
SessionViewclassapp.session as omnibase's templates read it: started, and its flash bag - app.session.flashbag.all, the messages a request left for the next one (omnibase's @Base/flashbag.html.twig draws them by label: success, info, warning, danger). Under Laravel the messages are flashed in the session under FLASHES ([label => [message, ...]]: Flashes::add()), read by the next request's page and gone with it, as Symfony's flash bag.
2 methods · 2 properties · 1 constant
Siteclassapp.site, as omnibase's SiteVariable answers it, from the site's settings (DatabaseSettings): its title and slogan, its logo, its meta defaults, the years since it opened, the time the page took.
8 methods
Themeclassapp.theme, as omnibase's Themizer answers it: the mode and the filter the visitor chose (their cookies THEME/MODE and THEME/FILTER), among those the site offers. omnibase's ThemizerInterface too, which its theme menus read (Base\Twig\Extension\MenuTwigExtension: render_theme_modes()...): no widths, events nor audiences offered here. Its layouts too (app.theme.layout(1), Themizer::getLayout()): the layoutN.html.twig of omnibridge.theme.layouts, a folder (the site's templates/layout).
21 methods
ConfigParametersclassLaravel's configuration as omnibase's parameters: a parameter is read by the same dotted path Laravel's config() reads ("app.name", and "base.user.delay" for a site that has config/base.php). A $bag given to get() is laid over it by key, as omnibase's parameter bags do: the bag's value wins, values under a path are merged key by key, a value of null is no value. all() is every parameter by its full name.
5 methods
DatabaseSettingsclassThe settings an omnibase site keeps in its database (layoutSetting and its translations, layoutSettingIntl), read through Doctrine DBAL in one query: each setting's value in each language (a JSON value, as omnibase stores it, none of a vault), and the parameter a setting stands for when the back office links it to one (its "bag").
4 methods
ActionRoutesclassThe routes an application's actions declare, registered in Laravel (step R27 of the audit "lesringostars face au master plan"): the same #[Route] attributes of symfony/routing that Symfony's router reads on the same classes - one declaration, both hosts -, read by the rules of symfony/routing's attribute loader (not by the loader itself, which stands on symfony/config), so that names, localized paths ("app_timeline.fr" with its `_locale`), requirements, defaults, priorities and environments are the ones Symfony gives them.
4 methods · 1 constant
LocalizedNamesclassThe route a name means in a language, as omnibase's router reads a name (step R27 of the audit "lesringostars face au master plan"; formerly the rule of lesringostars-laravel's SymfonyRoutes alone): a localized route is declared once per language ("app_timeline.fr", "app_timeline.en", as Symfony names the paths of a #[Route(["fr" => ..., "en" => ...])]) and an omnibase route may have a version without a destination ("app_timeline.default.fr"). A name is looked for in the page's language, as given, then as its version without a destination; a language the routes do not have takes the first of the fallback language's versions, in the routes' order (a German page links to /japon/travels).
1 method
AddressPicturesclassomnibase's Pictures contract under Laravel: what its `|picture` filter answers (CommonsTwigExtension::picture()) - a file under the public folder by its thumbnail at the size asked, MediaService's (omnibridge.media on, audit R6), or by its public path without it; an address or a path as it is; anything else an asset of the build (assets/...). An application that serves its stored pictures itself says where (stored()), and that answer comes first.
3 methods
ResponderclassAn action's result answered under Laravel: Laravel's adapter of omnibase's Base\Screen\Negotiation (step R10 of the audit "lesringostars face au master plan"; Base\Bridge\Symfony\ScreenResponder is Symfony's). What an application's action hands back - a View, a Template, Json, a Shell, a File, a Redirect, or null for no such page (404) - becomes Laravel's response: the request read as a Visit, the Answer made a Response (a JsonResponse for JSON data, a BinaryFileResponse for a file), its caching set.
6 methods
ScreenContextclassomnibase's screen context under Laravel, as Base\Bridge\Symfony\SymfonyScreenContext gives it under Symfony, asked once for the screen being answered:
4 methods
WysiwygTextsclassomnibase's Texts contract under Laravel: what its |wysiwyg and |wysiwyg_toc filters answer for an Editor.js document, the same passes in the same order with the same results (omnibase's HtmlTwigExtension, EditorEnhancer and its Heading, Link, Mention, Semantic and Media enhancers), then omnibase's own EditorJsRenderer and @Base/form/wysiwyg/editor_js.html.twig; Quill's HTML (the older texts) takes omnibase's WysiwygEnhancer's way: the links' pass, the headings' anchors, quill.html.twig. The Twig environment must hold omnibase's views under @Base (omnibridge.twig.paths), or be given (on()).
7 methods
ShieldServiceProviderclassglitchr/omnishield wired into a Laravel application, from config/omnishield.php - the keys of its Symfony bundle (plan "omniauth", step AU8b: omnibase's captcha after failed sign-ins, under both hosts): the Registry of the gateways named (each built by its package's factory, the HTTP-free ones: ALTCHA, the disposable domains, the tests' fixed one...), the WidgetPrinter, and ALTCHA's widget served by the application at the address the bundle serves it (serve_scripts), its gateways' default script then. Registered by OmnibridgeServiceProvider when omnishield is installed; wires nothing without a gateway.
4 methods · 2 constants
BuildCommandclassomnibridge/static's build under Laravel: the same Console\Cli as the plain command line, handed what this host offers the site's file - a renderer through the application's HTTP kernel (each page a visitor's GET, at --render-origin, by default config('app.url')), the container, the public folder and, given --actions, the routes the actions of those folders declare (Routing\ActionRoutes, as routes/web.php registers them).
1 method
BreakpointsclassWhat omnibase adds to a page once rendered for its scripts to know the screen's size: a style before the first stylesheet whose body:before says the breakpoint's name ("mobile", "tablet"...) in each media query.
2 methods
CompanionsclassWhat omnibase adds to a page for its template's companions, as its HtmlTagRenderer does under Symfony (step R27 of the audit "lesringostars face au master plan"): beside client/timeline.html.twig, a client/timeline.css.twig is the page's own style (a <style> before the end of its head), a client/timeline.mobile.css.twig its style for a breakpoint (<style media='...'>), a client/timeline.js.twig its script (a <script> after its body) - each rendered in the page's context.
1 method
Encoreclassencore_entry_link_tags() and encore_entry_script_tags() as omnibase prints them (its WebpackTagRenderer), over a site's builds (its own, omnibase's): an entry is its files and those of its "-async" and "-defer" halves (app is app-async and app-defer; form.editor is form-defer.editor), from the first build that has any; a stylesheet comes with its breakpoint versions beside it (layout2-async-mobile.css, media "all and (max-width: 470px)"); every script is deferred; a file is printed once per page.
4 methods
HostExtensionclassLaravel's answers to what a Symfony site's templates take from Symfony's own bundles rather than from omnibase - the host's part, which Symfony answers with its own (audit "lesringostars face au master plan", R24):
6 methods
OmnibaseExtensionsclassomnibase's own Twig extensions in a Laravel page (audit "lesringostars face au master plan", R24): the classes the core registers under Symfony, built here on what Laravel binds - the same functions and filters from the same code, nothing of them rewritten by an application:
5 methods
OmnibaseFiltersclassThe filters of omnibase's that its Symfony extensions register over Symfony's services, answered here by the same rules over what Laravel binds (step R27 of the audit "lesringostars face au master plan"): |trans_entity (TranslatorTwigExtension: an entity's noun, omnibase's EntityNouns over the Translations contract) and |obfuscate (MediaTwigExtension: omnibase's Obfuscator, the one omnibridge.media binds - the Symfony site's map, so an address either host wrote resolves on both).
4 methods
TwigclassA Twig environment over an omnibase site's templates, answered by Laravel: its folders and their namespaces (@Base, @Layout...), omnibridge/twig's contract (path(), url(), asset(), |trans), its is_granted() and csrf_token() on the container's Access and Tokens (AccessExtension, the code Symfony's pages ask as well: omnibridge/symfony registers it there) and helpers (|datetime, lang()...) in the page's language, and the application's own extensions.
1 method
Omnibridge\Laravel
CatalogueTranslations class
final class CatalogueTranslations implements Translations CatalogueTranslations.php:29
Messages from omnibase's ICU catalogues (<domain>+intl-icu.<locale>.yaml, or <domain>.<locale>.yaml) in the folders given - the core's, the bundles', the site's last so that its own words win - read by Symfony's Translation component (a library, not the framework), so that Laravel says the same words as Symfony.
A message is named as omnibase's templates name it: "@messages.menu.item2" is menu.item2 of the messages domain; its parameters by position ({0}, {1}) or by name ({privacy}); a message that names another one is translated again; one that is nowhere is printed as it was asked for.
Without a locale given, each message is in Laravel's current one (app()->getLocale()), which a middleware sets per request.
omnisense/omnibridge's Translations (trans() and exists()), omnibase's and omnibridge/twig's by their former names.
CatalogueTranslations::__construct()
public function __construct(string|array $directories, readonly ?string $locale = null, readonly string $fallback = 'fr')$directoriesthe catalogues' folders, the later ones over the earlier
CatalogueTranslations::translator()
public function translator(): TranslatorCatalogueTranslations::locale()
public function locale(): stringCatalogueTranslations::trans()
public function trans(mixed $id, array $parameters = [], ?string $domain = null, ?string $locale = null): stringCatalogueTranslations::exists()
public function exists(string $id, ?string $domain = null, ?string $locale = null): boolOmnibridgeServiceProvider class
final class OmnibridgeServiceProvider extends ServiceProvider OmnibridgeServiceProvider.php:98
omnisense/omnibase hosted by Laravel: each contract of its Foundation bound to Laravel's services under the contract's interface, and the Foundation's registry (Base\Contract\Runtime, omnisense/omnibridge's Omnibridge\Runtime) on Laravel's container, so that Runtime::urls(), ::parameters()... and app(Urls::class) are one object.
The host's contracts are omnisense/omnibridge's (Omnibridge\Contract\*), bound under their own names (their former names, Base\Contract\Urls... and omnibridge/twig's, were removed at omnibase 4's final pass). omnibase's own (Nouns, Pictures, Texts, the parameters, the screen context) keep Base\.
Bound: Urls on the router and the asset manifest, Translations on the ICU catalogues, Locales, Nouns, Access (the gate), Sessions (the guard), Tokens (the session's), Environment, Routes, Files (the disks), the parameters (Laravel's config, the database settings laid over it), PSR-20's clock, PSR-14's dispatcher, symfony/mailer's mailer; and Doctrine DBAL and ORM (omnibridge/doctrine) and Twig (omnibridge/twig) on the configuration; for omnibase's screens, Pictures (a picture's address, the application's stored ones where it says), Texts (|wysiwyg's passes on omnibase's own views) and the screen context (Base\Screen\ContextProvider: locale, site, links, viewer, theme, flashes); and an action's result answered (R10): omnibase's Negotiation on the container's Twig, Screen\Responder its Laravel side (Responder::action() for a route). With omnibridge.media on (R6), omnibase's media rule: MediaService on Laravel's router, Media bound to it, Pictures' thumbnails, and the image routes (/images/...) answered by Base\Service\ImageRoute - the same obfuscated addresses, thumbnails and formats as under Symfony; with omnibase's mapping too (R7), the attribute reader's Flysystem (an entity's #[Uploader]: uploads, audio), and the editor's pictures by omnibase's MediaEnhancer (Texts, MediaEnhancerInterface).
OmnibridgeServiceProvider::register()
public function register(): voidOmnibridgeServiceProvider::boot()
public function boot(): voidRouterUrlGenerator class
final class RouterUrlGenerator implements UrlGeneratorInterface RouterUrlGenerator.php:14
Symfony's URL generator interface over the Urls contract, for a library that asks for one (omnibase/consent's extension): an absolute URL is Urls::url(), any other reference type Urls::path().
RouterUrlGenerator::__construct()
public function __construct(readonly Urls $urls)RouterUrlGenerator::generate()
public function generate(string $name, array $parameters = [], int $referenceType = self::ABSOLUTE_PATH): stringRouterUrlGenerator::setContext()
public function setContext(RequestContext $context): voidRouterUrlGenerator::getContext()
public function getContext(): RequestContextRouterUrls class
final class RouterUrls implements Urls RouterUrls.php:29
Addresses answered by Laravel: a route by its name through Laravel's router, relative (path()) or whole (url()); a public file by its path, through the asset manifest of a build when one is given (a webpack or Vite manifest: "./fonts/RobotoSlab-Bold.woff2" is "/assets/fonts/RobotoSlab-Bold.9d4f57b2.woff2"), else as it is.
A route Laravel does not have may be answered elsewhere (elsewhere()): an application that serves part of a site gives the other part's addresses. Without that, an unknown route is Laravel's error.
Names may be read as omnibase's router reads them (localized()): a route declared once per language, or in a version without a destination, by its name alone (Routing\LocalizedNames: "app_timeline" is "app_timeline.fr" on a French page).
omnisense/omnibridge's Urls (omnibase's Base\Contract\Urls and omnibridge/twig's by their former names): one object answers the templates' path(), url(), asset() and Runtime::urls().
RouterUrls::__construct()
public function __construct(readonly ?\Closure $elsewhere = null, readonly ?string $manifestFile = null, readonly ?string $fallbackLocale = null)RouterUrls::elsewhere()
public function elsewhere(\Closure $elsewhere): selfThe same addresses, a route Laravel does not have answered by $elsewhere.
RouterUrls::localized()
public function localized(string $fallbackLocale = 'en'): selfThe same addresses, a name read as omnibase's router reads it (in the page's language, then without a destination, then in $fallbackLocale).
RouterUrls::path()
public function path(string $name, array $parameters = []): stringRouterUrls::url()
public function url(string $name, array $parameters = []): stringThe same route, whole.
RouterUrls::resolve()
public function resolve(string $name): ?stringThe route a name means here, null for none.
RouterUrls::asset()
public function asset(string $path): stringOmnibridge\Laravel\Auth
AccountUser class
final class AccountUser implements Authenticatable AccountUser.php:19
An account as Laravel's guard holds it (plan "omniauth", §3.2): the application's own object (omnibase's user, which implements nothing of Laravel) wrapped for the Authenticatable contract - its identifier the handle omniauth's Accounts give it, its password the hash, no remember token (the remember-me cookie is signed, RememberMe). The contracts an application reads the visitor through (Omnibridge\Contract\Access::getUser(), the screens' viewer, Twig's app.user) unwrap it: the code of the application sees the same object under both hosts.
A method the wrapper has not is the account's: auth()->user()->getEmail().
public readonly object $accountpublic readonly string $handlepublic readonly string $identifierpublic readonly array $rolesthe account's roles, as Security's getRoles() names them
AccountUser::__construct()
public function __construct(public readonly object $account, public readonly string $handle, public readonly string $identifier, public readonly array $roles = [])$rolesthe account's roles, as Security's getRoles() names them
AccountUser::of()
public static function of(object $account, string $handle, string $identifier): selfThe account's own roles, when it says them (omnibase's User::getRoles()).
AccountUser::getAuthIdentifierName()
public function getAuthIdentifierName(): stringAccountUser::getAuthIdentifier()
public function getAuthIdentifier(): stringAccountUser::getAuthPasswordName()
public function getAuthPasswordName(): stringAccountUser::getAuthPassword()
public function getAuthPassword(): ?stringAccountUser::getRememberToken()
public function getRememberToken(): ?stringAccountUser::setRememberToken()
public function setRememberToken($value): voidAccountUser::getRememberTokenName()
public function getRememberTokenName(): stringAccountUser::__call()
public function __call(string $method, array $arguments): mixedAccountUser::__get()
public function __get(string $name): mixedAccountUser::__isset()
public function __isset(string $name): boolAuthServiceProvider class
final class AuthServiceProvider extends ServiceProvider AuthServiceProvider.php:78
omniauth wired into a Laravel application (plan "omniauth", §3.2, step AU8), from config/omniauth.php - registered by OmnibridgeServiceProvider when config/omnibridge.php says 'auth' => true and omnisense/omniauth is installed; nothing of Auth\ without both.
The conductor (Omniauth\Omniauth) with the methods present - each key turns its method on; passkeys, TOTP and identity providers need their package -, the second-factor rule (EnrolledSecondFactors; omnibase's Base\Auth\Policy around it when the application binds its SecurityPolicy), the session as its State, a Laravel cache store as its Throttle (CacheThrottle), Laravel's dispatcher for its events (omnibridge's DispatcherEvents); and around it Laravel's side: the guard and the user provider (config/auth.php: driver "omniauth"), the gate's answers to Security's attributes (Roles), the routes (Routes), the middleware that keeps a visitor between two factors on the second factor's page, the cookies the Symfony site shares left out of Laravel's encryption (trusted_device, the remember-me), and - with omnibase's stores - the listener that brings an account up to date at its sign-in.
The stores are the application's: "omnibase" binds Base\Auth\'s on the entity manager, or each contract by the binding config/omniauth.php names.
const SECOND_FACTORS = 'omniauth.second_factors'const PROVIDER_FACTORY = 'omniauth.oauth_provider_factory'const SEALED_TOTP_SECRETS = 'omniauth.totp.sealed_secrets'The TOTP secrets sealed at rest (totp.secret_key), TotpSecrets' binding then.
AuthServiceProvider::register()
public function register(): voidAuthServiceProvider::boot()
public function boot(): voidAuthServiceProvider::on()
public static function on(Application $app): boolomnibridge.auth: on with true, off (the default) with false or null.
Contexts class
final class Contexts Contexts.php:18
omniauth's Context of a Laravel request: its origin and host (WebAuthn's), the visitor's address and browser, the trusted_device cookie (read as the Symfony site wrote it: left out of Laravel's encrypted cookies), and the firewall - the "fwl" claim of the trusted devices' tokens, "main" unless config/omniauth.php's trusted_device.firewall says otherwise: the name scheb/2fa gave the Symfony firewall that asked the second factor, so the devices it trusted are trusted here.
Contexts::__construct()
public function __construct(readonly Container $app, readonly string $cookie = 'trusted_device', readonly string $firewall = 'main')Contexts::of()
public function of(?Request $request = null): ContextOAuthProviders class
final class OAuthProviders OAuthProviders.php:24
omniauth's identity providers from config/omniauth.php: Providers::configured() through the provider packages' factories (omniauth/google's GoogleFactory; a provider without client id is not served), and a provider given as a binding ("service") as it is.
Each one's return address is, unless it sets one (redirect_uri), the PATH of its check route - never an absolute address made here: the providers are built once per process, which a long-running server (Octane, FrankenPHP) keeps between requests, so an absolute address would stay on the host of the first request. omniauth completes the path with the origin of each trip's request (Authorization::returnAddress()), and the exchange repeats that address.
OAuthProviders::create()
public static function create(array $config, Container $app, iterable $factories = []): Providers$configconfig/omniauth.php's oauth.providers, resolved (Settings)
$factoriesthe provider packages'
OmniauthGuard class
final class OmniauthGuard implements StatefulGuard OmniauthGuard.php:37
Laravel's guard over omniauth (plan "omniauth", §3.2; config/auth.php: driver "omniauth"): the session keeps the handle of the account signed in, user() reads the account back through omniauth's Accounts at each request (as Security's user provider refreshes it), wrapped for Laravel (AccountUser); a sign-in renews the session's id and sets the signed remember-me cookie when asked (RememberMe); a sign-out forgets both and omniauth's attempt.
Who signs in is omniauth's decision, taken by Controllers\SignIn: enter() is what it calls with an authenticated Result. attempt() asks omniauth the password (a second factor required leaves the attempt in the session and answers false: the second factor's page follows); between two factors the guard has no user, and pending() has the attempt (what the gate's IS_AUTHENTICATED_2FA_IN_PROGRESS and Middleware\SecondFactorPending read).
const HANDLE = 'omnibridge.auth.handle'
OmniauthGuard::__construct()
public function __construct(readonly string $name, UserProvider $provider, readonly Omniauth $omniauth, readonly Accounts $accounts, readonly Contexts $contexts, readonly Session $session, readonly Cookies $cookies, readonly ?RememberMe $rememberMe = null, readonly ?Dispatcher $events = null)OmniauthGuard::user()
public function user(): ?AuthenticatableOmniauthGuard::account()
public function account(): ?objectThe account signed in, the application's own object (the wrapper's account).
OmniauthGuard::pending()
public function pending(): ?AttemptThe attempt between two factors: a first factor passed, a second one offered; null otherwise.
OmniauthGuard::enter()
public function enter(Result $result): AccountUserSigns an account in, as omniauth concluded (Result::$remember says whether the browser is remembered).
OmniauthGuard::login()
public function login(Authenticatable $user, $remember = false): voidOmniauthGuard::loginUsingId()
public function loginUsingId($id, $remember = false): Authenticatable|falseOmniauthGuard::attempt()
public function attempt(array $credentials = [], $remember = false): bool$credentialsidentifier (or email, or username) and password
OmniauthGuard::once()
public function once(array $credentials = []): boolOmniauthGuard::onceUsingId()
public function onceUsingId($id): Authenticatable|falseOmniauthGuard::validate()
public function validate(array $credentials = []): boolOmniauthGuard::viaRemember()
public function viaRemember(): boolOmniauthGuard::logout()
public function logout(): voidOmniauthGuard::setRequest()
public function setRequest(Request $request): selfOmniauthGuard::name()
public function name(): stringThe guard's name in config/auth.php.
OmniauthGuard::remember()
public function remember(object $account): ?CookieThe cookie that remembers this browser, queued on the response.
OmniauthGuard::identifier()
public static function identifier(array $credentials): stringOmniauthUserProvider class
final class OmniauthUserProvider implements UserProvider OmniauthUserProvider.php:20
Laravel's user provider over omniauth's stores (config/auth.php: driver "omniauth"): an account by its handle (retrieveById) or by what the person typed (retrieveByCredentials: identifier, email or username), its password checked by the hasher omniauth's PasswordMethod uses - symfony/password-hasher, so a password longer than 72 bytes verifies as under Symfony - and rehashed when that hasher says so. No remember token: the remember-me cookie is signed (RememberMe).
OmniauthUserProvider::__construct()
public function __construct(readonly Accounts $accounts, readonly Passwords $passwords, readonly PasswordHasherInterface $hasher)OmniauthUserProvider::retrieveById()
public function retrieveById($identifier): ?AuthenticatableOmniauthUserProvider::retrieveByToken()
public function retrieveByToken($identifier, $token): ?AuthenticatableOmniauthUserProvider::updateRememberToken()
public function updateRememberToken(Authenticatable $user, $token): voidOmniauthUserProvider::retrieveByCredentials()
public function retrieveByCredentials(array $credentials): ?AuthenticatableOmniauthUserProvider::validateCredentials()
public function validateCredentials(Authenticatable $user, array $credentials): boolOmniauthUserProvider::rehashPasswordIfRequired()
public function rehashPasswordIfRequired(Authenticatable $user, array $credentials, bool $force = false): voidOmnibaseEffects class
final class OmnibaseEffects OmnibaseEffects.php:58
What a sign-in does around omniauth under Symfony, done under Laravel by the same omnibase classes (plan "omniauth", step AU8b; R25 and R26 of the master plan's gaps) - each where its classes are there and the stores are omnibase's, as omnibase's config/services/auth.php wires them under Symfony:
- the browsers an account signs in from (Base\Security\ConnectionTracker: userConnection rows, the browser's PHPUSERID in the session and its cookie, the request's host), marked at each sign-in and failure (TrackConnections) - not at each later request: a Symfony site that loads its users with Doctrine's entity provider does not either (only omnibase's UserProvider::refreshUser() does; an application wanting it listens to the guard's Authenticated event);
- the new device warned of (WarnNewDevice: the e-mail, the offer of a second factor), on the administrator's settings (Base\Service\SecurityPolicy over the stored settings: ReadSettings; its role hierarchy config/omniauth.php's);
- the captcha after failed sign-ins from an address (GuardSignIn on Base\Security\SignInCaptcha, its widget in the sign-in form), counted in the pool config/omniauth.php's captcha.pool names - the Symfony site's own, so a captcha one host asks for is asked by the other;
- "welcome back" to a disabled account (WelcomeBack);
- the e-mails - the sign-in link, the second factor's code, the new device, welcome back - written by Base\Notifier\Mail\SignInMails with the Notifier's templates and words, sent by Laravel's mailer (Mail\LaravelMailer), and omnibase's NotifierSender as omniauth's Sender.
const TRACKER = 'Base\Security\ConnectionTracker'const POLICY = 'Base\Service\SecurityPolicy'const CAPTCHA = 'Base\Security\SignInCaptcha'const FORM_GUARD = 'Base\Service\FormGuard'const MAILS = 'Base\Notifier\Mail\SignInMails'const COMPOSER = 'Base\Notifier\Mail\EmailComposer'const VARIABLES = 'Base\Notifier\Mail\MailVariables'const SETTINGS = 'omnibridge.omnibase.settings'The cookies omnibase writes and reads plain (UserTracker::PHPUSERID, SecurityPolicy::COOKIE_NEW_DEVICE_PROMPT_DISMISSED).
OmnibaseEffects::on()
public static function on(Application $app): boolWhether the stores are omnibase's and its sign-in's classes are there (omnisense/omnibase 4.x with AU8b).
OmnibaseEffects::register()
public static function register(Application $app): voidOmnibaseEffects::sender()
public static function sender(Application $app): ?objectomnibase's Sender (NotifierSender) on SignInMails, where no Notifier is bound and the application binds no Sender of its own.
OmnibaseEffects::boot()
public static function boot(Application $app, Dispatcher $events): voidThe listeners, in the order of config/services/auth.php's priorities; the plain cookies.
OmnibaseEffects::browser()
public static function browser(Application $app): stringThe browser's identifier (UserTracker::getUniqid()): the session's, else its cookie's, else a new one kept in both.
OmnibaseEffects::cookieDomain()
public static function cookieDomain(Application $app, ?Request $request): ?stringThe domain of omnibase's site-wide cookies for this request: Base\Routing\CookieDomain's rule (AdvancedRouter::getDomain() under Symfony) on base.router.use_fallbacks and base.router.host_fallbacks, as the application's config gives them; the request's host alone (no Domain attribute) where the application configures no router (no base.router.use_fallbacks) or with a core that has no such rule.
OmnibaseEffects::pool()
public static function pool(Application $app, string $key): CacheItemPoolInterfaceThe PSR-6 pool config/omniauth.php's $key.pool names (a binding), else Laravel's cache store as one.
Pages class
final class Pages Pages.php:19
The sign-in's pages (the form, the second factor's, the sign-out's), rendered as any page of the application is: through the bound Base\Screen\Negotiation - the container's Twig by default, the application's own rendering (its page context, its layout) when it binds one. Never cached: they carry the session's tokens.
Pages::__construct()
public function __construct(readonly Container $app)Pages::render()
public function render(Request $request, string $template, array $data, int $status = Response::HTTP_OK): ResponseRefusal class
final readonly class Refusal Refusal.php:15
A refused sign-in, as the page says it: the message's key and data (the
template's error.messageKey|trans(error.messageData, 'security'), what
Security's AuthenticationException gave omnibase's login page), omniauth's
failure and reason. Kept in the session for the page that follows, as an
array.
const MESSAGES = ['bad-credentials' => 'Invalid credentials.', 'bad-code' => 'code_invalid', 'invalid-link' => 'Invalid credentials.', 'expired' => 'Authentication request co…The messages a page translates, by omniauth's failure or "failure:reason" ("%reason%" replaced): omnibridge/symfony's.
public string $messageKeypublic array $messageDatapublic ?Factor $factorpublic ?Failure $failurepublic ?string $reason
Refusal::__construct()
public function __construct(public string $messageKey, public array $messageData = [], public ?Factor $factor = null, public ?Failure $failure = null, public ?string $reason = null)Refusal::of()
public static function of(Factor $factor, ?Failure $failure, ?string $reason, array $messages, ?string $other = null): self$messagesthe application's own, over MESSAGES
$othera refusal that is no failure of omniauth's
Refusal::toArray()
public function toArray(): arrayRefusal::fromArray()
public static function fromArray(mixed $data): ?selfRememberMe class
final class RememberMe RememberMe.php:19
The remember-me cookie (plan "omniauth", §1.9): the account's handle and the cookie's expiry, signed (HMAC-SHA256, the host's secret) with the account's password hash and address - Security's signature_properties ['password', 'email'] - so that a new password or a new address forgets every browser, as the Symfony site's remember-me does. No token is stored.
Laravel does not encrypt it (left out of EncryptCookies): its value is its own proof.
RememberMe::__construct()
public function __construct(readonly Accounts $accounts, readonly ?Passwords $passwords, readonly string $secret, readonly string $name = 'REMEMBERME', readonly int $lifetime = 604800)RememberMe::name()
public function name(): stringRememberMe::cookie()
public function cookie(object $account, bool $secure): CookieThe cookie that remembers this account on this browser.
RememberMe::forget()
public function forget(bool $secure): CookieThe cookie that forgets the browser.
RememberMe::account()
public function account(?string $value): ?objectThe account a cookie's value remembers, when it is signed for it and not yet expired; null otherwise.
Roles class
final class Roles Roles.php:20
Security's attributes as abilities of Laravel's gate (Gate::before): a role ("ROLE_ADMIN") is granted to an account that holds it or one above it in the hierarchy (security.yaml's role_hierarchy), IS_AUTHENTICATED_FULLY to an account signed in by its proofs (not by its remember-me cookie), IS_AUTHENTICATED_REMEMBERED and IS_AUTHENTICATED to any account signed in, IS_AUTHENTICATED_2FA_IN_PROGRESS to the visitor between two factors (scheb/2fa's name), PUBLIC_ACCESS and IS_AUTHENTICATED_ANONYMOUSLY to everybody. Any other ability is left to the gate's own definitions.
So is_granted('ROLE_ADMIN') in a template, and omnibase's Access contract, answer as under Symfony.
Roles::__construct()
public function __construct(readonly Auth $auth, readonly array $hierarchy = [])$hierarchya role and the roles it includes
Roles::decide()
public function decide(?Authenticatable $user, string $ability): ?boolThe gate's answer for a Security attribute: true, false, or null for an ability that is not one.
Roles::reachable()
public function reachable(array $roles): arrayThe roles reachable from these: themselves and every role below them in the hierarchy.
Routes class
final class Routes Routes.php:23
The routes of omniauth's sign-in, at the addresses and under the names config/omniauth.php gives them - by default those the Symfony site has (omnibase's security_login, security_logout, security_logoutRequest, security_loginWithToken; scheb/2fa's 2fa_login and 2fa_login_check; the passkey's; each identity provider's oauth_<name> and oauth_<name>_check), so the pages and scripts that name them do not change. In the web group; the forms' tokens are omniauth's to check (the Tokens contract), not Laravel's CSRF middleware's, which reads another field (PreventRequestForgery in Laravel 13, ValidateCsrfToken in 12, VerifyCsrfToken before).
Declared by the provider (omniauth.routes), or by an application that wants them elsewhere: Routes::register($router, $settings).
const CSRF_MIDDLEWARE = ['Illuminate\Foundation\Http\Middleware\PreventRequestForgery', 'Illuminate\Foundation\Http\Middleware\ValidateCsrfToken', 'Illuminate\Foundation\Http\Middle…Laravel's CSRF middleware, by its name in each version: the sign-in's routes run without it.
Routes::register()
public static function register(Router $router, Settings $settings): voidSessionState class
final class SessionState implements State SessionState.php:14
omniauth's State under Laravel: the visitor's session (the request's store, started by the web group's StartSession). Without one - a command - nothing is kept.
SessionState::__construct()
public function __construct(readonly Container $app)SessionState::get()
public function get(string $key): mixedSessionState::set()
public function set(string $key, mixed $value): voidSessionState::remove()
public function remove(string $key): voidSettings class
final class Settings Settings.php:14
config/omniauth.php, resolved: what the guard, the controllers and the routes read (omnibridge/symfony's OmniauthExtension::runtime() under Symfony). Each method's key turns it on (null: off); the defaults are those of omniauth.yaml, so one site says the same thing under both hosts.
public readonly array $passwordpublic readonly ?array $linkpublic readonly ?array $emailCodepublic readonly ?array $backupCodespublic readonly ?array $totppublic readonly ?array $trustedDevicepublic readonly ?array $passkeypublic readonly ?array $oauthpublic readonly array $secondFactorpublic readonly array $logoutpublic readonly ?array $rememberMepublic readonly array $roleHierarchypublic readonly ?array $throttlepublic readonly array $messagespublic readonly string|array $storespublic readonly array $providerspublic readonly string $secretpublic readonly string $loginRoutepublic readonly bool $routespublic readonly array $after
Settings::__construct()
public function __construct(array $config, string $appKey)$configconfig/omniauth.php's values
$appKeyLaravel's app.key, the secret when the config names none
Settings::passwordEnabled()
public function passwordEnabled(): boolSettings::csrf()
public function csrf(array $section): ?array- Returns
a form's CSRF field and intent, null when the check is off
Settings::oauthRoutes()
public function oauthRoutes(): array- Returns
the identity providers' check routes and the provider each one is
Settings::digits()
public function digits(): array- Returns
the digits of each second factor's codes, by omniauth's factor name
Settings::openRoutes()
public function openRoutes(): array- Returns
the routes a visitor between two factors may open
Settings::string()
public static function string(mixed $value): stringSettings::int()
public static function int(mixed $value, int $default = 0): intSettings::stringKeys()
public static function stringKeys(array $values): arrayOmnibridge\Laravel\Auth\Controllers
Ceremony class
final class Ceremony Ceremony.php:35
The steps of a sign-in that sign nobody in yet (Routes): the second factor's page, a passkey's request options, the trip out to an identity provider. The verifications themselves are Controllers\SignIn's.
The second factor's page renders the application's template with the very variables scheb/2fa's FormController gave it (twoFactorProvider, availableTwoFactorProviders, checkPathUrl, authCodeParameterName, displayTrustedOption, isCsrfProtectionEnabled, logoutPath...), the factors under scheb's names ("email" for omniauth's "email-code"): the template the Symfony site renders renders here unchanged. The code by e-mail is sent when its page is first shown (as scheb/2fa sent it), and again once it expired.
const PROVIDER_NAMES = ['totp' => 'totp', 'email-code' => 'email', 'backup-code' => 'backup-code']omniauth's factors under the names scheb/2fa gave its providers.
Ceremony::__construct()
public function __construct(readonly Omniauth $omniauth, readonly Contexts $contexts, readonly Settings $settings, readonly Pages $pages, readonly Auth $auth, readonly Redirector $redirector, readonly UrlGenerator $urls, readonly ?Tokens $tokens = null)Ceremony::secondFactorPage()
public function secondFactorPage(Request $request): ResponseCeremony::passkeyOptions()
public function passkeyOptions(Request $request): ResponseA passkey's request options, in the JSON web-auth/webauthn-symfony-bundle answered: {"status": "ok", "errorMessage": "", ...the options}.
Ceremony::oauthStart()
public function oauthStart(Request $request, string $provider): ResponseThe trip out to an identity provider: its authorization address, the state, PKCE and nonce kept in the attempt.
Ceremony::firstOf()
public static function firstOf(array $offered): ?FactorThe factor the second factor's page shows first: the first offered that is not a backup code.
SignIn class
final class SignIn SignIn.php:55
Every way omniauth signs in, under Laravel (plan "omniauth", §3.2; what omnibridge/symfony's OmniauthAuthenticator does under Symfony): the password form (its page too), the sign-in link, a passkey, the second factor's form, the return from an identity provider - each request turned into omniauth's Proof and Context, the forms' CSRF token checked through omnibridge's Tokens contract, Omniauth::verify() asked, and its Result answered:
- Authenticated: the guard opens the session (OmniauthGuard::enter(): the id renewed, the remember-me cookie when omniauth says so), the trusted_device cookie when it gave one; the page asked for, else the default; a passkey's answer in JSON.
- SecondFactorRequired: the attempt stays in the session (the guard has no user, pending() has it) and the second factor's page follows.
- Failed, IdentityUnknown: a Refusal for the page the visitor came from
(
error, the messages of config/omniauth.php); a passkey's in JSON, as web-auth/webauthn-symfony-bundle answered ({"status": "failed", ...}); a refused sign-in link is no link, the page answers as for none; an unknown identity waits for the sign-up (PENDING_IDENTITY).
And the sign-out: CSRF-checked as Security's logout with enable_csrf (a request without the session's token is refused, 403), its page asking to confirm by a link that carries one.
const CHOSEN = 'omnibridge.auth.factor'Where the second factor's page keeps the factor the visitor chose (scheb/2fa's "preferProvider").
const SECOND_FACTOR_ERROR = 'omnibridge.auth.second_factor_error'Where a refused second factor's error waits for its page.
const PENDING_IDENTITY = 'omnibridge.auth.pending_identity'Where an unknown identity waits for the sign-up (omniauth's PendingIdentity, as an array).
const LAST_ERROR = 'omnibridge.auth.last_error'Where the last refusal waits for the sign-in page (Refusal, as an array).
const LAST_USERNAME = 'omnibridge.auth.last_username'The identifier last typed, shown again by the sign-in page.
const LINK_SENT = 'omnibridge.auth.link_sent'A sign-in link was asked: the page says one was sent.
const FORM_EXTRA = 'omnibridge.auth.form_extra'The binding of what the sign-in form carries besides its fields, a \Closure(Request): string of markup printed with them (form_rest()): omnibase's captcha after failures from the visitor's address (Auth\OmnibaseEffects), as its Symfony form carries it.
SignIn::__construct()
public function __construct(readonly Omniauth $omniauth, readonly Contexts $contexts, readonly Settings $settings, readonly Pages $pages, readonly Auth $auth, readonly Cookies $cookies, readonly Redirector $redirector, readonly UrlGenerator $urls, readonly ?Tokens $tokens = null)SignIn::login()
public function login(Request $request): ResponseThe sign-in page (GET), and the password posted to it.
SignIn::page()
public function page(Request $request): ResponseThe sign-in page: its form, the last identifier typed, the error left by a refused attempt.
SignIn::password()
public function password(Request $request): ResponseThe password form posted: omniauth's password factor.
SignIn::link()
public function link(Request $request, ?string $token = null): ResponseThe sign-in link's page: with a token, the link signs in; without one (or a refused one), the page asks for an address.
SignIn::requestLink()
public function requestLink(Request $request): ResponseAn address posted: a link sent to it when it has an account - the same answer either way.
SignIn::passkey()
public function passkey(Request $request): ResponseA passkey's assertion, as the browser's credential.toJSON() posts it.
SignIn::secondFactorCheck()
public function secondFactorCheck(Request $request): ResponseThe second factor's code posted (a GET of the check: back to its page).
SignIn::oauthCheck()
public function oauthCheck(Request $request, string $provider): ResponseThe return from an identity provider: its code and state (or its error).
SignIn::logoutPage()
public function logoutPage(Request $request): ResponseThe sign-out's page: with the session's token, straight to the sign-out; without it, a page asking to confirm by a link that carries one (omnibase's SecurityController::Logout). Signed out already: back to the page the visitor came from.
SignIn::logout()
public function logout(Request $request): ResponseThe sign-out itself: the session's token required (as Security's logout with enable_csrf: 403 without it).
Omnibridge\Laravel\Auth\Listener
WelcomeFlash class
final class WelcomeFlash WelcomeFlash.php:27
The word of welcome a sign-in leaves for the next page (omnibase's SecuritySubscriber::onLoginSuccess() under Symfony, a "success" flash): for a verified account, "@notifications.login.success.<period>.<active>" - the period of the account's last activity (morning 05-10 h, afternoon 12-15 h, evening 19-05 h, day otherwise), "first" when that activity is not today's, "back" when it is ("Re-bonjour Marki !") -; for an account not yet saved, "@notifications.login.success.social". The period and the day are omnibase's own helpers (time_is_between(), daydiff(): the same answers as the Symfony site's, whatever they are); the account itself is the message's {0}, as omnibase's Notification gives it. Translated in the visitor's language (the Locales contract's), else the catalogues' default; a key the catalogues do not have - asked, or pointed to by an entry that is itself a key - is logged and flashed as nothing: a page never prints a key.
WelcomeFlash::__construct()
public function __construct(readonly Session $session, readonly Translations $translations, readonly ?Locales $locales = null, readonly ?LoggerInterface $logger = null)WelcomeFlash::onSignedIn()
public function onSignedIn(SignedIn $event): voidOmnibridge\Laravel\Auth\Middleware
EnrolmentPrompt class
final class EnrolmentPrompt EnrolmentPrompt.php:26
The second factor's enrolment a signed-in account is sent to (step R29 of the audit "lesringostars face au master plan"): omnibase's rule, Base\Auth\EnrolmentPrompt - the offer made once after a sign-in from an unknown browser (the session's flag the sign-in's WarnNewDevice sets), a second factor the administrator or a role requires and the account lacks until the session says "not now" -, as omnibase's SecurityEnrolmentSubscriber asks it under Symfony: a plain page asked is answered by a redirect to the enrolment page (user_settings_enrolment, omnibase's action), everything else goes on. Nothing where omnibase has no such rule, no SecurityPolicy is bound or no enrolment page is routed. Laravel has no impersonation.
Appended to the web group by the provider with omnibase's sign-in effects.
const RULE = 'Base\Auth\EnrolmentPrompt'const POLICY = 'Base\Service\SecurityPolicy'const ROUTE = 'user_settings_enrolment'const OFFERED = 'security_new_device_prompt'The session's keys: SecurityPolicy::SESSION_NEW_DEVICE_PROMPT, SESSION_ENROLMENT_SKIPPED
const SKIPPED = 'security_2fa_enrolment_skipped'
EnrolmentPrompt::__construct()
public function __construct(readonly Container $app)EnrolmentPrompt::handle()
public function handle(Request $request, \Closure $next): ResponseSecondFactorPending class
final class SecondFactorPending SecondFactorPending.php:20
Between two factors, the second factor's page and nothing else (plan "omniauth", §3.2; omnibridge/symfony's SecondFactorGate under Symfony): a visitor whose attempt passed a first factor and waits for a second one is sent to the page from any other request - but the page itself, its check, the sign-out, and the routes config/omniauth.php's second_factor.open_routes names. Appended to the web group by the provider.
SecondFactorPending::__construct()
public function __construct(readonly Auth $auth, readonly Settings $settings)SecondFactorPending::handle()
public function handle(Request $request, \Closure $next): ResponseOmnibridge\Laravel\Container
Aliases class
final class Aliases Aliases.php:20
The services an application aliases by Symfony's #[AsAlias] (step R27 of the audit "lesringostars face au master plan"), bound in Laravel's container as Symfony's container aliases them: the interface the attribute names - or the class's one interface, when it names none - is the class. One declaration on the class, both hosts: an application no longer keeps a list of its bindings for Laravel.
Aliases::bind(app(), Aliases::read(['App\\Repository\\' => base_path('src/Repository')]));
The attribute is read by its name: symfony/dependency-injection need not be installed.
const ATTRIBUTE = 'Symfony\Component\DependencyInjection\Attribute\AsAlias'
Aliases::read()
public static function read(array $folders): arrayThe aliases the classes of these folders declare, by namespace (PSR-4: a folder's file Foo/Bar.php is its namespace's Foo\Bar), in the order of their files.
$foldersnamespace prefix => folder
- Returns
interface => class
Aliases::of()
public static function of(string $class): arrayThe interfaces a class is the alias of (its #[AsAlias]).
Aliases::bind()
public static function bind(Container $container, array $aliases): voidEach alias as a shared binding: the interface resolves to the class the container makes (a repository: omnibridge/laravel's, by its class).
Omnibridge\Laravel\Contract
AppEnvironment class
final class AppEnvironment implements Environment AppEnvironment.php:8
What the application runs as: Laravel's environment (APP_ENV), debug (app.debug) and key (app.key, the secret).
AppEnvironment::__construct()
public function __construct(readonly string $name, readonly bool $debug, readonly string $secret)AppEnvironment::name()
public function name(): stringAppEnvironment::isDebug()
public function isDebug(): boolAppEnvironment::secret()
public function secret(): stringAppLocales class
final class AppLocales implements Locales AppLocales.php:13
The site's languages in omnibase's form (fr-FR: language and country joined by a dash) over Laravel's locale (fr, or fr_FR): the request's is the site's language that Laravel's current locale names, the default the one configured (or the first), the default first among them all.
AppLocales::__construct()
public function __construct(readonly array $available, readonly ?string $default = null)$availablethe site's locales (fr-FR, en-GB...)
AppLocales::getLocale()
public function getLocale(): stringAppLocales::getDefaultLocale()
public function getDefaultLocale(): stringAppLocales::getAvailableLocales()
public function getAvailableLocales(): arrayDateClock class
final class DateClock implements ClockInterface DateClock.php:9
PSR-20's clock on Laravel's dates: the time a test sets (Date::setTestNow(), $this->travel()) is this clock's too.
DateClock::now()
public function now(): \DateTimeImmutableDiskFiles class
final class DiskFiles implements Files DiskFiles.php:16
omnibase's storages as Laravel's disks: a storage ("local.uploads", "s3.private"...) is the disk the configuration maps it to (omnibridge.storages), else the disk of that name, else the default disk.
A local disk is a file on this machine; one with an address (url, as the public disk has) is served, from the public folder when it is local (the storage:link).
DiskFiles::__construct()
public function __construct(readonly Disks $disks, readonly array $storages = [])$storagesomnibase's storage name => Laravel's disk name
DiskFiles::publicPath()
public function publicPath(string $path, ?string $storage = null): ?stringDiskFiles::publicUrl()
public function publicUrl(string $path, ?string $storage = null): ?stringDiskFiles::localPath()
public function localPath(string $path, ?string $storage = null): ?stringDiskFiles::isRemote()
public function isRemote(?string $storage = null): boolDispatcherEvents class
final class DispatcherEvents implements EventDispatcherInterface DispatcherEvents.php:9
PSR-14's dispatcher on Laravel's: an event object goes to the listeners of its class, and comes back.
DispatcherEvents::__construct()
public function __construct(readonly Dispatcher $events)DispatcherEvents::dispatch()
public function dispatch(object $event): objectGateAccess class
final class GateAccess implements Access GateAccess.php:16
What the visitor may do, answered by Laravel's gate: an attribute is an ability (a role the application defines as one, "ROLE_ADMIN", or a policy's "edit" on a Thread), allowed or not on the subject; the visitor is the default guard's user.
GateAccess::__construct()
public function __construct(readonly Gate $gate, readonly Auth $auth)GateAccess::isGranted()
public function isGranted(mixed $attribute, mixed $subject = null): boolGateAccess::getUser()
public function getUser(): ?objectThe visitor's account: the application's own object (omnibase's user), unwrapped from the guard's AccountUser.
GuardSessions class
final class GuardSessions implements Sessions GuardSessions.php:15
The visitor's session ended by Laravel's guard: a user signed out when it is the one signed in (logout() forgets it and its remember-me cookie); false otherwise.
GuardSessions::__construct()
public function __construct(readonly Auth $auth)GuardSessions::signOut()
public function signOut(object $user): boolRouterRoutes class
final class RouterRoutes implements Routes RouterRoutes.php:17
What Laravel's routes are beyond their addresses: the path a route is declared with ("/articles/{slug}"), the route an address leads to (GET), and its icons - none of Laravel's own: omnibase's #[Iconize] is read on Symfony's controllers; where the routes are also answered elsewhere (elsewhere()), a route's icons are the ones declared there.
RouterRoutes::__construct()
public function __construct(readonly Router $router, readonly ?Routes $elsewhere = null)RouterRoutes::elsewhere()
public function elsewhere(Routes $elsewhere): selfThe same routes, one Laravel does not have answered by $elsewhere (an application serving part of a site: the other part's routes, as RouterUrls::elsewhere() gives their addresses) - its pattern, its icons.
RouterRoutes::pattern()
public function pattern(string $name): ?stringRouterRoutes::match()
public function match(string $url): ?stringRouterRoutes::icons()
public function icons(string $name): ?arraySessionTokens class
final class SessionTokens implements Tokens SessionTokens.php:19
A form's token against cross-site requests: Laravel's session token, the one its CSRF middleware checks, and the same check (the token sent back equal to the session's, compared in constant time). Laravel has one token for every intent, so the intent is not part of it - by design, kept here: Symfony's per-intent tokens narrow what a token leaked from one form can post within the same session; both are bound to the session and renewed with it (the sign-in regenerates it), which is the protection against another site's request. A page then carries the same value for every intent (its forms, data-csrf, the X-CSRF-Token headers, the sign-out link).
SessionTokens::__construct()
public function __construct(readonly Container $app)SessionTokens::csrf()
public function csrf(string $intent): stringSessionTokens::isValid()
public function isValid(string $intent, ?string $token): boolTransportMailer class
final class TransportMailer implements MailerInterface TransportMailer.php:15
symfony/mailer's MailerInterface on Laravel's mail: a message omnibase builds (a Symfony Email) sent by the default mailer's transport, which is Symfony's too.
TransportMailer::__construct()
public function __construct(readonly Container $app)TransportMailer::send()
public function send(RawMessage $message, ?Envelope $envelope = null): voidOmnibridge\Laravel\Doctrine
Connections class
final class Connections Connections.php:14
A Doctrine DBAL connection from one of Laravel's database connections (config/database.php): the same server, database and credentials, so that Doctrine (omnibridge/doctrine's entity manager) and Eloquent, if the application uses it, read the same tables.
Connections::create()
public static function create(array $config): Connection$configa connection of Laravel's database configuration
Connections::parameters()
public static function parameters(array $config): array- Returns
DriverManager's parameters
Omnibridge\Laravel\Form
FormExtension class
final class FormExtension extends AbstractExtension FormExtension.php:17
The form functions of a page's templates under Laravel: form_start(), form_widget(), form_row(), form_label(), form_errors(), form_rest() and form_end() (Symfony's FormExtension) by FormRenderer, and form_proxy() / form_view() (omnibase's FormTwigExtension, its FormProxy: the forms every page carries) answered by the page's FormViews, by name (thread:searchbar).
The forms are Symfony's by nature (D3): shown here, posted to the application that answers them.
FormExtension::__construct()
public function __construct(readonly FormRenderer $renderer, readonly array $views = [])$viewsthe page's forms, by name
FormExtension::getFunctions()
public function getFunctions(): arrayFormExtension::view()
public function view(string $name): ?FormViewFormRenderer class
final class FormRenderer FormRenderer.php:13
form_start(), form_widget(), form_row(), form_label(), form_errors(), form_rest() and form_end() for the forms of FormView, with the markup omnibase's form theme gives them: inputs, a switch, a list of switches. Placeholders and labels are translated as Symfony's form theme translates them.
FormRenderer::__construct()
public function __construct(readonly Translations $translations)FormRenderer::start()
public function start(FormView $form, array $options = []): stringFormRenderer::widget()
public function widget(FormView $field, array $options = []): stringFormRenderer::row()
public function row(FormView $field, array $options = []): stringFormRenderer::errors()
public function errors(FormView $form): stringFormRenderer::fieldLabel()
public function fieldLabel(FormView $field, ?string $label = null, array $options = []): stringform_label(): the field's label (the one given, else its own), in omnibase's form theme's markup.
FormRenderer::rest()
public function rest(FormView $form): stringform_rest(): the fields not printed yet (the hidden ones: the token), without the form's end.
FormRenderer::end()
public function end(FormView $form): stringThe fields not printed yet (the hidden ones: a parent's id, the token), then the end of the form.
FormView class
final class FormView implements ArrayAccess, IteratorAggregate FormView.php:15
A form as omnibase's templates read one (Symfony's FormView: its vars, its children by name), for the few forms its pages show on every page (omnibase's FormProxy: the search bar, the newsletter), printed with the markup of omnibase's form theme by FormRenderer. Only the view: what answers its submission is the application's.
public array $varspublic array $children = []public bool $rendered = falsepublic readonly ?FormView $parent
FormView::__construct()
public function __construct(string $name, array $vars = [], public readonly ?FormView $parent = null)FormView::add()
public function add(string $name, array $vars = []): selfFormView::createView()
public function createView(): selfWhat omnibase's FormProxy hands: a form whose view is made on demand.
FormView::offsetExists()
public function offsetExists(mixed $offset): boolFormView::offsetGet()
public function offsetGet(mixed $offset): FormViewFormView::offsetSet()
public function offsetSet(mixed $offset, mixed $value): voidFormView::offsetUnset()
public function offsetUnset(mixed $offset): voidFormView::getIterator()
public function getIterator(): \ArrayIteratorOmnibridge\Laravel\Http
Localize class
final class Localize Localize.php:23
The page's language, chosen as omnibase's LocalizerSubscriber chooses it under Symfony: the visitor's choice (the LANG cookie SwitchLocale sets), else the browser's preferred language among the site's (omnibridge.locales.available), else the site's default (omnibridge.locales.default) - Laravel's locale, its language (fr); a route of one language is that language's. The language shown is remembered in LANG for the next page, as Symfony writes it (en-GB).
In the web group of an omnibase site under Laravel (bootstrap/app.php: $middleware->web(append: [Localize::class])), the LANG cookie left unencrypted, as Symfony writes it.
omnibase's cookie of the visitor's language.
Localize::handle()
public function handle(Request $request, Closure $next): ResponseSwitchLocale class
final class SwitchLocale SwitchLocale.php:20
The language menu's links (/locale/en: omnibase's _switch_locale), as omnibase's LocalizerController answers them under Symfony: the visitor's choice kept in the LANG cookie (Localize reads it) - a language of the site's (omnibridge.locales.available), written as Symfony names it (en_GB) -, then back to the page they came from on this site; none given, the choice forgotten; a language the site does not speak, the choice forgotten and the home.
Route::get('/locale/{_locale?}', SwitchLocale::class)->name('_switch_locale');
SwitchLocale::__invoke()
public function __invoke(Request $request, ?string $_locale = null): RedirectResponseOmnibridge\Laravel\Mail
LaravelMailer class
final class LaravelMailer implements MailerInterface LaravelMailer.php:19
symfony/mailer's MailerInterface over Laravel's mail (plan "omniauth", step AU8b; R26 of the master plan's gaps): an e-mail written as a Symfony Mime message (omnibase's Base\Notifier\Mail\EmailComposer) sent by the transport of one of config/mail.php's mailers - Laravel's mail is Symfony's Mailer, its SMTP, log or array transport the same objects.
The contract both hosts answer: Symfony's own mailer under Symfony.
LaravelMailer::__construct()
public function __construct(readonly Factory $mail, readonly ?string $mailer = null)LaravelMailer::send()
public function send(RawMessage $message, ?Envelope $envelope = null): voidOmnibridge\Laravel\Map
MapServiceProvider class
final class MapServiceProvider extends ServiceProvider MapServiceProvider.php:73
omnisense/omnimap wired into a Laravel application, from config/omnimap.php - the keys of omnibridge/symfony's omnimap.yaml (cache.pool a store of Laravel's cache; the routes but the tile's are the application's):
return [ 'provider' => 'openstreetmap', 'secret' => env('MAP_SECRET'), 'providers' => ['openstreetmap' => ['user_agent' => 'MySite/1.0 (+https://example.org)']], 'cache' => ['storage' => storage_path('app/omnimap'), 'directory' => 'omnimap', 'make' => 'auto'], 'routes' => ['tile' => ['path' => '/omnimap/{signature}/{id}.webp', 'name' => 'omnimap_tile', 'register' => true]], ];
The providers are omnimap/google's, omnimap/openstreetmap's and omnimap/maplibre's when installed, and any factory the application binds with the tag omnimap.provider_factory (FACTORY_TAG); geocoder names the provider Omnimap\GeocoderInterface is (the page's by default).
The cache is on cache.drive, an omnidrive drive of the bound Omnidrive\Drives (a storage's name: "local.uploads"), or on cache.storage, a directory (DirectoryStorage) or the container's name of an Omnimap\Snapshot\Storage. Binds Registry, Snapshots, MapPrinter, GeocoderInterface and omnibridge/twig's MapExtension, which omnibridge/laravel's Twig adds to a page's environment; routes the tiles (GET: TileController, WebP at a .webp path, cache.max_age, cache.public_directory, cache.public_size) unless routes.tile.register is false - a host whose web server serves the tiles from the public folder, or that shares another host's cache, read only. The capture and the deletion of a picture are routed by omnibridge/symfony; a Laravel host names them (routes.export.name, routes.suppress.name) for the buttons. The HTTP client is the one bound as "omnimap.http_client", Symfony's otherwise.
Registered by OmnibridgeServiceProvider when omnimap is installed; wires nothing unless config/omnimap.php names a provider.
const ROUTES = ['tile' => ['path' => '/omnimap/{signature}/{id}.webp', 'name' => 'omnimap_tile', 'register' => true], 'metadata' => ['path' => '/omnimap/{signature}', 'name…const FACTORIES = ['Omnimap\Google\GoogleFactory', 'Omnimap\OpenStreetMap\OpenStreetMapFactory', 'Omnimap\MapLibre\MapLibreFactory']The omnimap/* providers' factories made when their package is installed; another provider's is bound by the application and tagged FACTORY_TAG.
const FACTORY_TAG = 'omnimap.provider_factory'The tag of an application's own provider factories (Omnimap\ProviderFactoryInterface), as omnibridge/symfony's.
MapServiceProvider::register()
public function register(): voidMapServiceProvider::extension()
public static function extension(): ?MapExtensionThe Twig extension, when omnimap is installed and config/omnimap.php names a provider; null otherwise.
MapServiceProvider::boot()
public function boot(Router $router): voidMapServiceProvider::config()
public static function config(Application $app): arrayTileController class
final class TileController TileController.php:20
A tile of a map's picture kept in omnimap's cache (MapServiceProvider's tile route), as omnibridge/symfony's SnapshotController serves it: as WebP when the route's path ends in .webp (fitted within cache.public_size; GD with WebP, else Imagick, else as kept), public and cacheable (cache.max_age); with cache.public_directory, written there too at the route's own path, so that the web server serves it without PHP the next time.
const MAX_AGE = 86400Seconds a tile is cached for by default (a day).
TileController::__construct()
public function __construct(readonly Snapshots $snapshots, readonly string $tilePath = MapServiceProvider::ROUTES['tile']['path'], readonly ?string $publicDirectory = null, readonly ?int $publicSize = null, readonly int $maxAge = self::MAX_AGE)TileController::tile()
public function tile(Request $request, string $signature, int|string $id = 0): ResponseOmnibridge\Laravel\Media
DiskStorages class
final class DiskStorages implements ContainerInterface DiskStorages.php:19
omnibase's storages by name (local.cache, local.uploads...) as Laravel's disks, for Base\Service\Flysystem (audit "lesringostars face au master plan", R6): a PSR-11 container of each disk's Flysystem operator - the disk omnibridge.storages names for a storage, else the disk of the same name. A local disk is omnibase's local storage (its root, its files).
Omnidrive\Drives is read over it (OperatorDrives): each disk an omnidrive drive by the storage's name.
DiskStorages::__construct()
public function __construct(readonly Disks $disks, readonly array $storages = [])$storagesomnibase's storage => Laravel's disk
DiskStorages::get()
public function get(string $id): mixedDiskStorages::has()
public function has(string $id): boolDiskStorages::getProvidedServices()
public function getProvidedServices(): arrayThe storages it gives, as a Symfony service locator lists them (what Omnidrive\Flysystem\OperatorDrives reads their names from): those omnibridge.storages maps, then every disk of config/filesystems.php.
ImageController class
final class ImageController ImageController.php:18
omnibase's image route under Laravel (audit "lesringostars face au master plan", R6): each route of Base\Service\ImageRoute::ROUTES, declared under its name, is answered by ImageRoute's action for it - the route's parameters (data, identifier, extension) given by name, the cacheless routes without the local cache. The answer is ImageRoute's HttpFoundation response, which Laravel sends as it is; an image that does not resolve is its NotFoundHttpException, a 404.
ImageController::__construct()
public function __construct(readonly ImageRoute $route)ImageController::__invoke()
public function __invoke(Request $request): ResponseLaravelMediaRouter class
final class LaravelMediaRouter implements MediaRouter LaravelMediaRouter.php:22
Base\Contract\MediaRouter over Laravel's router (audit "lesringostars face au master plan", R6): what omnibase's MediaService asks a router, for the image routes this package declares under their Symfony names (Base\Service\ImageRoute::ROUTES) - a named route's address, the route and parameters an address matches, a public file's address (the Urls contract's asset()).
The reference types are Symfony's: 0 an absolute URL, 1 an absolute path, 3 a network path; a relative path (2) is given as an absolute path.
LaravelMediaRouter::__construct()
public function __construct(readonly Router $router, readonly UrlGenerator $urls, readonly Urls $assets)LaravelMediaRouter::generate()
public function generate(string $name, array $parameters = [], int $referenceType = 1): stringLaravelMediaRouter::getRouteMatch()
public function getRouteMatch(?string $routeUrl = null): ?arrayThe first route an address matches, in the order they were declared (fallback routes last, as Laravel matches them), on a copy of the route: the matched route of the request being served keeps its own parameters.
LaravelMediaRouter::getRouteName()
public function getRouteName(?string $routeUrl = null): ?stringLaravelMediaRouter::getAssetUrl()
public function getAssetUrl(string $nameOrUrl, ?string $packageName = null): stringLaravelMediaRouter::getUrl()
public function getUrl(?string $nameOrUrl = null, array $parameters = [], int $referenceType = 1): stringServiceMedia class
final class ServiceMedia implements Media ServiceMedia.php:15
omnibase's Media contract under Laravel (audit "lesringostars face au master plan", R6): MediaService's answers, as Base\Bridge\Symfony\ServiceMedia gives them under Symfony - the extension of a file, the image route's obfuscated data, the route's address -, MediaService built on Laravel's router (LaravelMediaRouter).
ServiceMedia::__construct()
public function __construct(readonly MediaService $media)ServiceMedia::extension()
public function extension(?string $path): ?stringServiceMedia::obfuscate()
public function obfuscate(?string $path, array $config = [], array $filters = []): ?stringServiceMedia::link()
public function link(string $route, array $parameters, ?string $path, array $config = []): ?stringOmnibridge\Laravel\Page
AppVariable class
final class AppVariable AppVariable.php:17
The app variable of omnibase's templates, in Laravel: the request (its language, its address, its headers and attributes, as Symfony's Request names them), the visitor (the account signed in, the application's own object, as Symfony's app.user; none by default), the session, the site, the theme, the referrer (omnibase's app.referrer, an object printed as the page the visitor came from on this site, or as nothing: Page\Referrer), and the application's app.admin when it gives one (omnibase's AdminVariable: the back-office address of a record, app.admin.crudify(entity)).
public readonly RequestView $requestpublic readonly Site $sitepublic readonly Theme $themepublic readonly mixed $userpublic readonly mixed $sessionpublic readonly ?Referrer $referrerpublic readonly ?object $adminomnibase's app.admin (its AdminVariable: crudify() gives a record's back-office address), the application's own object
AppVariable::__construct()
public function __construct(public readonly RequestView $request, public readonly Site $site, public readonly Theme $theme, public readonly mixed $user = null, public readonly mixed $session = null, public readonly ?Referrer $referrer = null, public readonly ?object $admin = null)AppVariable::of()
public static function of(Request $request, string $locale, Site $site, Theme $theme, ?object $user = null, ?object $admin = null): selfAppVariable::referrer()
public static function referrer(Request $request): ?stringThe page the visitor came from, when it is this site's and not the page itself.
Bag class
final class Bag Bag.php:9
A bag read by a closure, with the words of Symfony's ParameterBag and FlashBag: get(key, default) and all().
Bag::__construct()
public function __construct(readonly \Closure $read, readonly ?\Closure $all = null)$readthe value under a key
$allevery value, [] when the bag gives none
Bag::get()
public function get(string $key, mixed $default = null): mixedBag::all()
public function all(): arrayReferrer class
final class Referrer implements Stringable Referrer.php:10
app.referrer as omnibase's templates read it (omnibase's ReferrerInterface under Symfony): the page the visitor came from on this site, null for another site or none; printed as that address, or as nothing.
Referrer::__construct()
public function __construct(readonly ?string $url)Referrer::getUrl()
public function getUrl(): ?stringReferrer::sameSite()
public function sameSite(): boolReferrer::__toString()
public function __toString(): stringRequestView class
final class RequestView RequestView.php:11
app.request with the words of Symfony's Request: getLocale(), uri, headers.get(), attributes.get('_route').
public readonly Bag $headerspublic readonly Bag $attributes
RequestView::__construct()
public function __construct(readonly Request $request, readonly string $locale)RequestView::getLocale()
public function getLocale(): stringRequestView::getUri()
public function getUri(): stringRequestView::getPathInfo()
public function getPathInfo(): stringSessionView class
final class SessionView SessionView.php:15
app.session as omnibase's templates read it: started, and its flash bag - app.session.flashbag.all, the messages a request left for the next one (omnibase's @Base/flashbag.html.twig draws them by label: success, info, warning, danger). Under Laravel the messages are flashed in the session under FLASHES ([label => [message, ...]]: Flashes::add()), read by the next request's page and gone with it, as Symfony's flash bag.
const FLASHES = 'omnibridge.flashes'The session key the flashed messages wait under.
public readonly bool $startedpublic readonly Bag $flashbag
SessionView::__construct()
public function __construct(?Session $session = null)SessionView::add()
public static function add(Session $session, string $label, string $message): voidLeaves a message for the next request's page, under its label (omnibase's Notification::send($label)).
Site class
final class Site Site.php:12
app.site, as omnibase's SiteVariable answers it, from the site's settings (DatabaseSettings): its title and slogan, its logo, its meta defaults, the years since it opened, the time the page took.
Site::__construct()
public function __construct(readonly DatabaseSettings $settings, readonly string $defaultLocale, readonly ?\Closure $upload = null)$uploadthe address of an uploaded file (the logo)
Site::title()
public function title(): ?stringSite::slogan()
public function slogan(): ?stringSite::logo()
public function logo(): ?stringThe logo's file (base.settings.logo, an upload), at the address the application serves it at.
Site::meta()
public function meta(array $meta = []): arrayThe page's meta: the site's defaults (meta.description._self...) under what the page says.
Site::menu()
public function menu(): ?arraySite::age()
public function age(): stringThe years since it opened (base.settings.launchdate), this year when it does not say.
Site::execution_time()
public function execution_time(): floatTheme class
final class Theme implements ThemizerInterface Theme.php:16
app.theme, as omnibase's Themizer answers it: the mode and the filter the visitor chose (their cookies THEME/MODE and THEME/FILTER), among those the site offers. omnibase's ThemizerInterface too, which its theme menus read (Base\Twig\Extension\MenuTwigExtension: render_theme_modes()...): no widths, events nor audiences offered here. Its layouts too (app.theme.layout(1), Themizer::getLayout()): the layoutN.html.twig of omnibridge.theme.layouts, a folder (the site's templates/layout).
Theme::__construct()
public function __construct(readonly array $modes, readonly array $filters, readonly ?string $modeId, readonly ?string $filterId, readonly array $noFilter, readonly array $layouts = [])$layoutslayoutN.html.twig by N
Theme::of()
public static function of(array $config, ?\Illuminate\Http\Request $request): ?selfThe visitor's theme among those omnibridge.theme offers (its modes, filters, no_filter), their cookies THEME/MODE and THEME/FILTER read from the request; none without modes.
Theme::getLayout()
public function getLayout(int|string $id = 0): stringThe layout of that number (layout1.html.twig), else the first there is, as omnibase's Themizer::getLayout() answers it.
Theme::mode()
public function mode(): ?arrayTheme::filter()
public function filter(): ?arrayTheme::audience()
public function audience(): ?arrayTheme::event()
public function event(): ?arrayTheme::width()
public function width(): ?arrayTheme::color_scheme()
public function color_scheme(): stringTheme::modes()
public function modes(): arrayTheme::filters()
public function filters(): arrayTheme::getAvailableModes()
public function getAvailableModes(): arrayTheme::getMode()
public function getMode(): ?arrayTheme::getAvailableFilters()
public function getAvailableFilters(): arrayTheme::getFilter()
public function getFilter(): ?arrayTheme::getAvailableWidths()
public function getAvailableWidths(): arrayTheme::getWidth()
public function getWidth(): ?arrayTheme::getAvailableEvents()
public function getAvailableEvents(): arrayTheme::getEvent()
public function getEvent(): ?arrayTheme::getAudienceCategories()
public function getAudienceCategories(): arrayTheme::getAudience()
public function getAudience(): ?arrayOmnibridge\Laravel\Parameters
ConfigParameters class
final class ConfigParameters implements ParameterBagInterface ConfigParameters.php:21
Laravel's configuration as omnibase's parameters: a parameter is read by the same dotted path Laravel's config() reads ("app.name", and "base.user.delay" for a site that has config/base.php). A $bag given to get() is laid over it by key, as omnibase's parameter bags do: the bag's value wins, values under a path are merged key by key, a value of null is no value. all() is every parameter by its full name.
Omnibase's HotParameters lays the database settings over this one (OmnibridgeServiceProvider): Runtime::parameters() is that overlay.
ConfigParameters::__construct()
public function __construct(readonly Repository $config)ConfigParameters::get()
public function get(string $key = '', ?array $bag = null): array|bool|string|int|float|UnitEnum|nullConfigParameters::set()
public function set(string $path, array|bool|string|int|float|UnitEnum|null $value, ?array &$bag = null): voidConfigParameters::has()
public function has(string $path, ?array $bag = null): boolConfigParameters::all()
public function all(): arrayDatabaseSettings class
final class DatabaseSettings DatabaseSettings.php:18
The settings an omnibase site keeps in its database (layoutSetting and its translations, layoutSettingIntl), read through Doctrine DBAL in one query: each setting's value in each language (a JSON value, as omnibase stores it, none of a vault), and the parameter a setting stands for when the back office links it to one (its "bag").
A setting is read in the default language's value whatever the page's language, else in any language it has: as omnibase's settings answer on a page (an English page shows the French title though an en-GB one exists).
DatabaseSettings::__construct()
public function __construct(readonly Connection $db)DatabaseSettings::values()
public function values(): array- Returns
every setting's values, by path then locale
DatabaseSettings::value()
public function value(string $path, string $defaultLocale): mixedA setting in the default language's value, else in any; null for none.
DatabaseSettings::parameters()
public function parameters(string $defaultLocale): arrayThe settings linked to a parameter, by the parameter's full name: what omnibase's HotParameters lays over the configuration.
Omnibridge\Laravel\Routing
ActionRoutes class
final class ActionRoutes ActionRoutes.php:33
The routes an application's actions declare, registered in Laravel (step
R27 of the audit "lesringostars face au master plan"): the same #[Route]
attributes of symfony/routing that Symfony's router reads on the same
classes - one declaration, both hosts -, read by the rules of
symfony/routing's attribute loader (not by the loader itself, which
stands on symfony/config), so that names, localized paths
("app_timeline.fr" with its _locale), requirements, defaults,
priorities and environments are the ones Symfony gives them.
ActionRoutes::register(app('router'), ActionRoutes::load(['App\\Action\\' => base_path('src/Action')], 'dev'));
Each route runs its action through Screen\Responder::action() (the
route's parameters by name, the query string, the services); its
_controller is the action as Symfony's FrameworkBundle names it (the
class for an invokable one, "Class::method" otherwise). The routes are
registered in the order Symfony matches them (by priority, then as
declared): an address answers with the same route on both hosts.
A route that names no method answers GET and HEAD here: an action a host shares is read; posting a form is the Symfony host's (D3).
const ENVIRONMENTS = ['local' => 'dev', 'testing' => 'test', 'production' => 'prod']Laravel's environments by the name Symfony gives them (a route's
env).
ActionRoutes::load()
public static function load(array $folders, ?string $env = null): RouteCollectionThe routes the classes of these folders declare, in Symfony's order.
$foldersnamespace prefix => folder (PSR-4: a folder's Foo/Bar.php is its namespace's Foo\Bar)
$envthe environment by its Symfony name: a route declared for others is left out
ActionRoutes::environment()
public static function environment(string $laravel): stringLaravel's environment by its Symfony name (local is dev, testing is test, production is prod).
ActionRoutes::register()
public static function register(Router $router, RouteCollection $routes): voidEach route of the collection in Laravel's router, in the collection's order.
ActionRoutes::action()
public static function action(Route $route): arrayThe action a route runs: its class and method.
LocalizedNames class
final class LocalizedNames LocalizedNames.php:17
The route a name means in a language, as omnibase's router reads a name (step R27 of the audit "lesringostars face au master plan"; formerly the rule of lesringostars-laravel's SymfonyRoutes alone): a localized route is declared once per language ("app_timeline.fr", "app_timeline.en", as Symfony names the paths of a #[Route(["fr" => ..., "en" => ...])]) and an omnibase route may have a version without a destination ("app_timeline.default.fr"). A name is looked for in the page's language, as given, then as its version without a destination; a language the routes do not have takes the first of the fallback language's versions, in the routes' order (a German page links to /japon/travels).
LocalizedNames::resolve()
public static function resolve(string $name, string $locale, iterable $names, string $fallbackLocale = 'en'): ?string$namesthe routes' names, in their order
Omnibridge\Laravel\Screen
AddressPictures class
final class AddressPictures implements Pictures AddressPictures.php:18
omnibase's Pictures contract under Laravel: what its |picture filter
answers (CommonsTwigExtension::picture()) - a file under the public folder
by its thumbnail at the size asked, MediaService's (omnibridge.media on,
audit R6), or by its public path without it; an address or a path as it
is; anything else an asset of the build (assets/...). An application that
serves its stored pictures itself says where (stored()), and that answer
comes first.
AddressPictures::__construct()
public function __construct(readonly Urls $urls, readonly string $publicDir = '', readonly ?\Closure $stored = null, readonly ?MediaService $media = null)$storedthe address the application serves a stored picture at, null for none
AddressPictures::stored()
public function stored(\Closure $stored): selfThe same pictures, a stored one at the address $stored gives (null: the rule below).
AddressPictures::picture()
public function picture(?string $image, ?int $width = null, ?int $height = null): ?stringResponder class
final class Responder Responder.php:45
An action's result answered under Laravel: Laravel's adapter of omnibase's Base\Screen\Negotiation (step R10 of the audit "lesringostars face au master plan"; Base\Bridge\Symfony\ScreenResponder is Symfony's). What an application's action hands back - a View, a Template, Json, a Shell, a File, a Redirect, or null for no such page (404) - becomes Laravel's response: the request read as a Visit, the Answer made a Response (a JsonResponse for JSON data, a BinaryFileResponse for a file), its caching set.
The templates are rendered by the bound Negotiation: by default the container's Twig Environment for every kind; an application whose pages carry more (its page context, what it adds once rendered) binds its own, rendering Negotiation::PAGE, PART and ALONE each its way.
A route runs an action written once for every host by action():
Route::get('/{destination}/articles/{slug}', Responder::action(Article::class))->name('app_article');The action's parameters are the route's by name, $query the query
string's values, $body what a POST sent (its JSON object, else its form
fields: step R29), its services the container's.
Responder::__construct()
public function __construct(readonly Negotiation $negotiation)Responder::respond()
public function respond(Request $request, View|Template|Json|Shell|File|Redirect|null $result, array $legacy = [], ?Frame $frame = null): HttpResponse$legacya View's variables of before, for a site's own template
Responder::action()
public static function action(string $class, string $method = '__invoke'): \ClosureA route's action: the class (or a method of it) called with the route's
parameters by name, query the query string's values, body the
posted values, its other
parameters from the container; its result answered.
Responder::body()
public static function body(Request $request): arrayWhat a request's body carries, as omnibase's ActionArguments gives it under Symfony: its JSON object (a script's request), else its form fields.
Responder::visit()
public static function visit(Request $request): VisitWhat the client asked, off Laravel's request.
Responder::response()
public static function response(Answer $answer): HttpResponseLaravel's response of an Answer.
ScreenContext class
class ScreenContext implements ContextProvider ScreenContext.php:35
omnibase's screen context under Laravel, as Base\Bridge\Symfony\SymfonyScreenContext gives it under Symfony, asked once for the screen being answered:
- the locale: the site's locale of Laravel's (Locales: fr is fr-FR) in the form a Symfony request carries it (fr_FR);
- the host: the scheme, host and base path the page was asked at;
- the site: omnibase's settings (base.settings.title, slogan, logo, meta.description) in the default language, the logo by its asset's address unless it is one already, the year;
- the links: home (app_index, else "/"), login, register, logout, and each language's address (_switch_locale), those Laravel (or elsewhere()) answers;
- the viewer: the Access contract's user (the guard's);
- the theme: the colour scheme of the mode the visitor chose (their cookie THEME/MODE) among omnibridge.theme.modes, none without modes;
- the flashes: the session's messages under that key, taken.
An application binds its own (Base\Screen\ContextProvider) to add its frame fields.
ScreenContext::__construct()
public function __construct(readonly Application $app)ScreenContext::frame()
public function frame(array $extra = []): FrameScreenContext::viewer()
public function viewer(): ?ViewerScreenContext::flashes()
public function flashes(string $type): arrayWysiwygTexts class
final class WysiwygTexts implements Texts WysiwygTexts.php:27
omnibase's Texts contract under Laravel: what its |wysiwyg and |wysiwyg_toc filters answer for an Editor.js document, the same passes in the same order with the same results (omnibase's HtmlTwigExtension, EditorEnhancer and its Heading, Link, Mention, Semantic and Media enhancers), then omnibase's own EditorJsRenderer and @Base/form/wysiwyg/editor_js.html.twig; Quill's HTML (the older texts) takes omnibase's WysiwygEnhancer's way: the links' pass, the headings' anchors, quill.html.twig. The Twig environment must hold omnibase's views under @Base (omnibridge.twig.paths), or be given (on()).
Every leaf of the document goes through the enhancers as a string, as PHP hands it to theirs (true is "1", false "", 7 "7"): the page's data-edjs says so too. What needs omnibase's services is left as written: a mention (its identifier is omnibase's obfuscated one), the layout's semantics, a picture's address through omnibase's image route - unless the application says where it serves a picture (images()): Laravel has no image route.
WysiwygTexts::__construct()
public function __construct(readonly Environment|\Closure $twig, readonly ?string $host = null, readonly ?\Closure $images = null)$hostthe host whose links are made relative (the request's when null)
$imagesa picture's address as the application serves it, null to leave it
WysiwygTexts::images()
public function images(\Closure $images): selfThe same texts, a picture's stored address (a block's file origin, else url) given to $images.
WysiwygTexts::on()
public function on(Environment $twig): selfThe same texts rendered through another environment (a page's own, with its extensions).
WysiwygTexts::isEditor()
public function isEditor(?string $text): boolWysiwygTexts::supports()
public static function supports(?string $content): boolWysiwygTexts::render()
public function render(?string $content, array $options = []): string$optionsheadings, semantics, media, row_attr, hydrate
WysiwygTexts::toc()
public function toc(?string $content, ?int $maxLevel = null): arrayOmnibridge\Laravel\Shield
ShieldServiceProvider class
final class ShieldServiceProvider extends ServiceProvider ShieldServiceProvider.php:27
glitchr/omnishield wired into a Laravel application, from config/omnishield.php - the keys of its Symfony bundle (plan "omniauth", step AU8b: omnibase's captcha after failed sign-ins, under both hosts): the Registry of the gateways named (each built by its package's factory, the HTTP-free ones: ALTCHA, the disposable domains, the tests' fixed one...), the WidgetPrinter, and ALTCHA's widget served by the application at the address the bundle serves it (serve_scripts), its gateways' default script then. Registered by OmnibridgeServiceProvider when omnishield is installed; wires nothing without a gateway.
const FACTORIES = ['Omnishield\Altcha\AltchaGatewayFactory', 'Omnishield\Disposable\DisposableGatewayFactory', 'Omnishield\Testing\FixedGatewayFactory']The factories built here: those that need no HTTP client (as the bundle lists them).
const ALTCHA = 'Omnishield\Altcha\AltchaGatewayFactory'
ShieldServiceProvider::register()
public function register(): voidShieldServiceProvider::boot()
public function boot(): voidShieldServiceProvider::defaultChallenge()
public static function defaultChallenge(Application $app): ?stringThe captcha a form asks by default: challenge.gateway, else the first gateway; null without one.
ShieldServiceProvider::acceptsUnreachable()
public static function acceptsUnreachable(Application $app): boolWhether a captcha that does not answer lets a form through (challenge.unreachable: accept; reject by default, as the bundle).
Omnibridge\Laravel\Static
BuildCommand class
final class BuildCommand extends Command BuildCommand.php:25
omnibridge/static's build under Laravel: the same Console\Cli as the plain command line, handed what this host offers the site's file - a renderer through the application's HTTP kernel (each page a visitor's GET, at --render-origin, by default config('app.url')), the container, the public folder and, given --actions, the routes the actions of those folders declare (Routing\ActionRoutes, as routes/web.php registers them).
php artisan omnibridge:static:build static.php --out=storage/static --actions='App\Action\=src/Action'
Registered by OmnibridgeServiceProvider only where omnibridge/static is installed.
BuildCommand::handle()
public function handle(): intOmnibridge\Laravel\View
Breakpoints class
final class Breakpoints Breakpoints.php:10
What omnibase adds to a page once rendered for its scripts to know the screen's size: a style before the first stylesheet whose body:before says the breakpoint's name ("mobile", "tablet"...) in each media query.
Breakpoints::style()
public static function style(array $breakpoints): string$breakpointsa name (mobile) and its media query
Breakpoints::inject()
public static function inject(string $html, array $breakpoints): stringThe page with the style before its first stylesheet in its head; a page without a head, or without a stylesheet there, as it is.
Companions class
final class Companions Companions.php:16
What omnibase adds to a page for its template's companions, as its HtmlTagRenderer does under Symfony (step R27 of the audit "lesringostars face au master plan"): beside client/timeline.html.twig, a client/timeline.css.twig is the page's own style (a <style> before the end of its head), a client/timeline.mobile.css.twig its style for a breakpoint (<style media='...'>), a client/timeline.js.twig its script (a <script> after its body) - each rendered in the page's context.
Companions::inject()
public static function inject(Environment $twig, string $template, array $context, string $html, array $breakpoints = []): string$breakpointsthe breakpoints' media by name (mobile => all and (max-width: 470px))
Encore class
final class Encore Encore.php:14
encore_entry_link_tags() and encore_entry_script_tags() as omnibase prints them (its WebpackTagRenderer), over a site's builds (its own, omnibase's): an entry is its files and those of its "-async" and "-defer" halves (app is app-async and app-defer; form.editor is form-defer.editor), from the first build that has any; a stylesheet comes with its breakpoint versions beside it (layout2-async-mobile.css, media "all and (max-width: 470px)"); every script is deferred; a file is printed once per page.
Encore::__construct()
public function __construct(readonly array $builds, readonly string $publicDir, readonly array $breakpoints, readonly array $optional = [])$buildsthe builds, in the order they are looked into
$breakpointsa name (mobile) and its media query
$optionalthe entries a page loads with another (form: form.editor)
Encore::linkTags()
public function linkTags(string $entry): stringEncore::scriptTags()
public function scriptTags(string $entry): stringEncore::cssSource()
public function cssSource(string $entry): stringencore_entry_css_source(): an entry's stylesheets themselves, one after the other, from the first build that has the entry (omnibase's WebpackTagRenderer::renderCssSource(): what an e-mail's template inlines, the e-mail frame's email-layout1); '' when none has it.
HostExtension class
final class HostExtension extends AbstractExtension HostExtension.php:28
Laravel's answers to what a Symfony site's templates take from Symfony's own bundles rather than from omnibase - the host's part, which Symfony answers with its own (audit "lesringostars face au master plan", R24):
- encore_entry_link_tags(), encore_entry_script_tags(), encore_entry_css_source() (WebpackEncoreBundle, through omnibase's WebpackTagRenderer): Encore, over the builds omnibridge.encore names;
- html_entry_noscript_tags() (omnibase's HtmlTagRenderer, which collects what the services of a Symfony request add): nothing adds any here;
- stimulus_controller() (StimulusBundle): data-controller="name", the name as StimulusBundle normalises it;
- absolute_url() (Twig bridge's HttpFoundationExtension) and the
|urlfilter (omnibase's router, AdvancedRouter::getUrl()): an address whole, at the request's origin; a route's name by the Urls contract.
HostExtension::__construct()
public function __construct(readonly Urls $urls, readonly \Closure $request, readonly ?Encore $encore = null)$requestthe request being answered
HostExtension::getFunctions()
public function getFunctions(): arrayHostExtension::getFilters()
public function getFilters(): arrayHostExtension::stimulusController()
public static function stimulusController(string $name): Markupdata-controller="name", the name as StimulusBundle normalises it (a/b: a--b, a_b: a-b, no leading @).
HostExtension::absoluteUrl()
public function absoluteUrl(?string $path): stringSymfony's absolute_url(): a path whole at the request's origin, a relative one under the page's folder.
HostExtension::url()
public function url(?string $nameOrUrl): ?stringomnibase's |url: none as it is; an address whole as it is; a path at the request's origin; a route's name its address whole (Urls::url()).
OmnibaseExtensions class
final class OmnibaseExtensions OmnibaseExtensions.php:81
omnibase's own Twig extensions in a Laravel page (audit "lesringostars face au master plan", R24): the classes the core registers under Symfony, built here on what Laravel binds - the same functions and filters from the same code, nothing of them rewritten by an application:
- MenuTwigExtension (render_locale(), render_theme_*()): the Locales contract and the visitor's theme (omnibridge.theme, Theme::of());
- EnumTwigExtension (enum(), |colorify, |trans_enum): the page's Translations, once the entity manager has registered the DBAL types;
- PictureTwigExtension (image(), |thumbnail, |soundify, |mimetype...): omnibase's MediaService, omnibridge.media on;
- LinkTwigExtension (|urlify, |linkify); IconTwigExtension (|iconify): omnibase's icon adapters over its metadata (public/bundles/base) and the Routes contract's icons;
- TextsTwigExtension (|wysiwyg, |wysiwyg_toc): the Texts contract, on the page's own environment;
- NotificationTwigExtension (the bell): Access, Tokens, the bound Notifications repository, WebPushService on omnibridge.push's keys;
- SecurityPolicyTwigExtension (security_policy): the bound SecurityPolicy (omnibridge.auth with omnibase's stores);
- DeployVersionExtension (deploy_version()): omnibridge.deploy.project_dir;
- DemoTwigExtension (demo_mode(), demo_accounts()): the application's
environment, never omnibase's
demohere; - omnibase/consent's ConsentExtension (consent_options(), consent_settings()), where it is installed and omnibridge.consent.config names the site's configuration (a YAML file with a consent: key, or the array);
- HostExtension: what the templates take from Symfony's bundles (Encore's tags over omnibridge.encore, stimulus_controller(), absolute_url(), |url).
Each where the core has it (omnisense/omnibase 4 from R24) and what it stands on is bound. The container's Environment gets them all (OmnibridgeServiceProvider); an application that renders a page in an environment of its own (its globals, its forms) extends it with extend().
OmnibaseExtensions::__construct()
public function __construct(readonly Application $app)OmnibaseExtensions::available()
public static function available(): boolWhether the core has its framework-free Twig extensions (omnisense/omnibase 4 from R24).
OmnibaseExtensions::extend()
public function extend(Environment $twig, ?Translations $translations = null, ?ThemizerInterface $theme = null): Environmentomnibase's extensions added to an environment not yet used.
$translationsthe page's (its language), the bound ones otherwise
$themethe visitor's theme, Theme::of(omnibridge.theme) otherwise
OmnibaseExtensions::extensions()
public function extensions(Environment $twig, ?Translations $translations = null, ?ThemizerInterface $theme = null): arrayOmnibaseExtensions::admin()
public function admin(): ?objectapp.admin: a record's back-office page by omnibase/admin's names, on the Routes and Urls contracts.
OmnibaseFilters class
final class OmnibaseFilters extends AbstractExtension OmnibaseFilters.php:22
The filters of omnibase's that its Symfony extensions register over Symfony's services, answered here by the same rules over what Laravel binds (step R27 of the audit "lesringostars face au master plan"): |trans_entity (TranslatorTwigExtension: an entity's noun, omnibase's EntityNouns over the Translations contract) and |obfuscate (MediaTwigExtension: omnibase's Obfuscator, the one omnibridge.media binds - the Symfony site's map, so an address either host wrote resolves on both).
OmnibaseFilters::__construct()
public function __construct(readonly Translations $translations, readonly ?\Closure $obfuscator = null)OmnibaseFilters::getFilters()
public function getFilters(): arrayOmnibaseFilters::entity()
public function entity(object|string $entityOrClass, ?string $property = null, string|array $options = TranslatorInterface::NOUN_SINGULAR): ?stringOmnibaseFilters::entityExists()
public function entityExists(object|string $entityOrClass, ?string $property = null, string|array $options = TranslatorInterface::NOUN_SINGULAR): boolTwig class
final class Twig Twig.php:27
A Twig environment over an omnibase site's templates, answered by Laravel: its folders and their namespaces (@Base, @Layout...), omnibridge/twig's contract (path(), url(), asset(), |trans), its is_granted() and csrf_token() on the container's Access and Tokens (AccessExtension, the code Symfony's pages ask as well: omnibridge/symfony registers it there) and helpers (|datetime, lang()...) in the page's language, and the application's own extensions.
Twig::create()
public static function create(array $paths, Urls $urls, Translations $translations, string $locale, ?string $timezone = null, array $extensions = [], array $options = []): Environment$pathsa folder and its namespace, null for the main one
$optionsTwig's (cache, auto_reload, strict_variables...)