Kernel
in package
FinalYes
El corazón de FacturaScripts. Se encarga de gestionar las rutas y ejecutar los controladores.
Table of Contents
Properties
- $routes : array<string|int, mixed>
- $routesCallbacks : array<string|int, Closure>
- $timers : array<string|int, mixed>
Methods
- addRoute() : void
- addRoutes() : void
- clearRoutes() : void
- getExecutionTime() : float
- getTimer() : float
- getTimers() : array<string|int, mixed>
- init() : void
- lock() : bool
- rebuildRoutes() : void
- run() : void
- saveRoutes() : bool
- startTimer() : void
- stopTimer() : float
- unlock() : bool
- version() : float
- checkControllerClass() : array<string|int, mixed>
- finishRequest() : void
- getErrorHandler() : ErrorControllerInterface
- getRelativeUrl() : string
- loadDefaultRoutes() : void
- loadRoutes() : void
- matchesRoute() : bool
- runController() : void
Properties
$routes
private
static array<string|int, mixed>
$routes
= []
$routesCallbacks
private
static array<string|int, Closure>
$routesCallbacks
= []
$timers
private
static array<string|int, mixed>
$timers
= []
Methods
addRoute()
public
static addRoute(string $route, string $controller[, int $position = 0 ][, string $customId = '' ]) : void
Parameters
- $route : string
- $controller : string
- $position : int = 0
- $customId : string = ''
addRoutes()
public
static addRoutes(Closure $closure) : void
Parameters
- $closure : Closure
clearRoutes()
public
static clearRoutes() : void
getExecutionTime()
public
static getExecutionTime([int $decimals = 5 ]) : float
Parameters
- $decimals : int = 5
Return values
floatgetTimer()
public
static getTimer(string $name) : float
Parameters
- $name : string
Return values
floatgetTimers()
public
static getTimers() : array<string|int, mixed>
Return values
array<string|int, mixed>init()
public
static init() : void
lock()
public
static lock(string $processName) : bool
Parameters
- $processName : string
Return values
boolrebuildRoutes()
public
static rebuildRoutes() : void
run()
public
static run(string $url) : void
Parameters
- $url : string
saveRoutes()
public
static saveRoutes() : bool
Return values
boolstartTimer()
public
static startTimer(string $name) : void
Parameters
- $name : string
stopTimer()
public
static stopTimer(string $name) : float
Parameters
- $name : string
Return values
floatunlock()
public
static unlock(string $processName) : bool
Parameters
- $processName : string
Return values
boolversion()
public
static version() : float
Return values
floatcheckControllerClass()
private
static checkControllerClass(string $controller) : array<string|int, mixed>
Parameters
- $controller : string
Return values
array<string|int, mixed>finishRequest()
private
static finishRequest() : void
getErrorHandler()
private
static getErrorHandler(Exception $exception) : ErrorControllerInterface
Parameters
- $exception : Exception
Return values
ErrorControllerInterfacegetRelativeUrl()
private
static getRelativeUrl(string $url) : string
Parameters
- $url : string
Return values
stringloadDefaultRoutes()
private
static loadDefaultRoutes() : void
loadRoutes()
private
static loadRoutes() : void
matchesRoute()
private
static matchesRoute(string $url, string $route) : bool
Parameters
- $url : string
- $route : string
Return values
boolrunController()
private
static runController(string $url) : void
Parameters
- $url : string