Application Class
Definition
Namespace: DafCore
Phar: DafCore.phar
A builder for web applications and services.
Constructor
__construct(bool $isRelease)
-
bool $isRelease- true for release mode, on release modetruethe app will load from phar files.
Properties
static string $BaseFolder
- Hold the app base folder.
Router $Router
- Hold the app router class.
IServicesProvidor $Services
- Hold the app IServicesProvidor class.
Methods
function Run(): void
Start the pipline.
function GetExecutionTime(): string
Get app execution time my milisecond.
function AddAntiForgeryToken(): void
Add the AntiForgery:class to the DI Container.
Register AntiForgery token to the sesson before app Render.
global dependency list
static function HostName(): string
Returns the current request host name.
This value is taken from the HTTP_HOST server variable and represents
the domain name (and optional port) used by the client to access
the application (e.g. "example.com" or "example.com:8080").
static function IsHttps(): bool
Determines whether the current request is using HTTPS.
Checks the HTTPS server variable and returns true if the request
was made over a secure SSL/TLS connection.