- A lot of fixes done on this for a test project.

This commit is contained in:
mcndave committed 2021-02-16 03:10:04 +00:00
1 parent 52e55f2bba
commit 09b3e47c19
11 files changed
+78 -21

No files matched your search

+14 -1
View File
@@ -28,7 +28,7 @@ class Lean
throw new \Exception("You must provide at least one application to autoload within your config file ( 'lean' => 'autoload' => [] )");
}
foreach($list as $application) {
foreach(array_filter($list) as $application) {
if ( $this->container->has($application) ) {
$this->applications[] = ( new Application() )->fromArray($this->container->get($application));
}
@@ -49,6 +49,19 @@ class Lean
return static::DEFAULT_PICEA_CONTEXT;
}
public function getPiceaExtensions() : array
{
$list = [];
foreach(array_reverse($this->applications) as $apps) {
if ( $apps->piceaExtensions ?? null ) {
$list = array_merge($list, $apps->piceaExtensions);
}
}
return $list;
}
public function getRoutable() : array
{
return array_merge(...array_map(fn($app) => $app->routes ?? [], $this->applications));