- Work done on the kinda-micro-framework to allow smoother deployment

This commit is contained in:
mcndave committed 2022-11-29 19:53:41 +00:00
1 parent f719246624
commit aba9a65a3c
14 files changed
+357 -12

No files matched your search

+13 -2
View File
@@ -30,7 +30,7 @@ class Lean
foreach(array_filter($list) as $application) {
if ( $this->container->has($application) ) {
$this->applications[] = ( new Application() )->fromArray($this->container->get($application));
$this->applications[] = ( new Application($application) )->fromArray($this->container->get($application));
}
else {
throw new \RuntimeException("Trying to load an application '$application' which have not been configured yet");
@@ -38,6 +38,17 @@ class Lean
}
}
public function getApplication(string $name) : ? Application
{
foreach($this->applications as $app) {
if ($app->name === $name) {
return $app;
}
}
return null;
}
public function getPiceaContext() : string
{
foreach(array_reverse($this->applications) as $apps) {
@@ -116,7 +127,7 @@ class Lean
require($path . "http.php"),
require($path . "language.php"),
require($path . "routes.php"),
require($path . "security.php"),
# require($path . "security.php"),
require($path . "software.php"),
require($path . "template.php"),
);