@adonisjs/view
Version:
View/template engine for AdonisJs
54 lines (53 loc) • 1.44 kB
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;
}