mirror of
https://github.com/arthur-pbty/portfolio2023.git
synced 2026-06-04 07:46:21 +02:00
54 lines
1.4 KiB
TypeScript
54 lines
1.4 KiB
TypeScript
/// <reference types="@adonisjs/application/build/adonis-typings" />
|
|
import type { ApplicationContract } from '@ioc:Adonis/Core/Application';
|
|
/**
|
|
* View provider to register view to the application
|
|
*/
|
|
export default class ViewProvider {
|
|
protected app: ApplicationContract;
|
|
constructor(app: ApplicationContract);
|
|
/**
|
|
* Add globals for resolving routes
|
|
*/
|
|
private addRouteGlobal;
|
|
/**
|
|
* Share application reference, a config and env variable with the
|
|
* templates.
|
|
*/
|
|
private addGlobals;
|
|
/**
|
|
* Copy globals exposed by Edge
|
|
*/
|
|
private copyEdgeGlobals;
|
|
/**
|
|
* Registering the brisk route to render view directly from the route.
|
|
*/
|
|
private registerBriskRoute;
|
|
/**
|
|
* Registering the http context getter to access an isolated
|
|
* view instance with the request and route.
|
|
*/
|
|
private registerHTTPContextGetter;
|
|
/**
|
|
* Decide whether or not to cache views. If a user opts to remove
|
|
* the valdation, then `CACHE_VIEWS` will be a string and not
|
|
* a boolean, so we need to handle that case
|
|
*/
|
|
private shouldCacheViews;
|
|
/**
|
|
* Register repl binding
|
|
*/
|
|
private defineReplBindings;
|
|
/**
|
|
* Define assets manager bindings
|
|
*/
|
|
private defineAssetsManagerBindings;
|
|
/**
|
|
* Register view binding
|
|
*/
|
|
register(): void;
|
|
/**
|
|
* Setup view on boot
|
|
*/
|
|
boot(): void;
|
|
}
|