- Work done on the kinda-micro-framework to allow smoother deployment
This commit is contained in:
1 parent
f719246624
commit
aba9a65a3c
14 files changed
+357
-12
No files matched your search
+13
-2
@@ -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"),
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user