History
A file for storing old documentation and notes. Partially because I might use them. Partially for historical purposes. Partially because I'm just not ready to let go.
The History
folder contains additional files to preserve
v0.3 notes README stuff (prior to December 2021)
Request lifecycle
-
.htaccess
routes todeliver.php
or wherever you like - Server setup: Database configuration, other non-liaison things
-
$lia = new Liaison()
<- Liaison adds its built-in package (or pass['bare'=>true]
) -
new \Lia\Package($lia, $dir, $configs)
for each package to add-
new $Component()
for each component in the package -
$Component->onCreate()
<- Called from\Lia\Compo
-
$Component->onReady()
<- Called from\Lia\Compo
-
$Component->onComponentsLoaded()
<- After all components in THIS package have calledonCreate
&onReady
. Called by\Lia\Package
-
$Component->onPackageReady()
<- After routes, views, & configs have been loaded for this package-
$Component->onPrePackageReady()
is called first, but is not recommended. If used, you must callparent::onPrePackageReady()
to keep prefix scanning enabled
-
-
-
$lia->deliver()
calls$lia->getResponse()
(the following is all called from\Lia\Compo\Server
)-
$lia->emit('PreAllPackagesReady')
- emit
AllPackagesReady
<- Handle in components by declaringonEmitAllPackagesReady()
- emit
RequestStarted($request, $response)
- emit
RoutesFound($routeList)
- emit
RoutesFiltered($finalRoute)
- resolve route
- emit
RouteResolved($route, $response)
-
if ($response->useTheme)
, load theme, emitThemeLoaded($themeView)
, then set$response->content
to(string)$themeView
- emit
ResponseReady($response)
-
-
$lia->deliver()
has a response-
$response->sendHeaders()
-
if ($response->sendContent) echo $response->content
- emit
ResponseSent($response)
- close connection (May not work in all web hosts / apache setups)
- emit
RequestFinished($response)
-