- WIP on leaning lean a bit

This commit is contained in:
mcndave committed 2023-11-15 22:11:17 -05:00
1 parent 4f648b47bd
commit f3c4cbd95a
13 files changed
+41 -180

No files matched your search

+24 -11
View File
@@ -28,6 +28,8 @@ class Application
public array $tellPhp;
public array $taxus;
public array $data = [];
public function __construct(string $name) {
@@ -38,7 +40,14 @@ class Application
{
$this->data = array_replace($this->data, $data);
if (is_array($picea = $data['picea'] ?? false)) {
$this->loadData();
return $this;
}
public function loadData() : static
{
if (is_array($picea = $this->data['picea'] ?? false)) {
if ($picea['context'] ?? false ) {
$this->piceaContext = $picea['context'];
}
@@ -56,13 +65,13 @@ class Application
}
}
if (is_array($ulmus = $data['ulmus'] ?? false)) {
if (is_array($ulmus = $this->data['ulmus'] ?? false)) {
if ($ulmus['entities'] ?? false) {
$this->entities = $ulmus['entities'];
}
}
if (is_array($tell = $data['tell'] ?? false)) {
if (is_array($tell = $this->data['tell'] ?? false)) {
if ($tell['json'] ?? false) {
$this->tellJson = $tell['json'];
}
@@ -72,20 +81,24 @@ class Application
}
}
if (is_array($data['routes'] ?? false)) {
$this->routes = $data['routes'];
if (is_array($this->data['routes'] ?? false)) {
$this->routes = $this->data['routes'];
}
if (is_array($data['cronard'] ?? false)) {
$this->cronard = $data['cronard'];
if (is_array($this->data['cronard'] ?? false)) {
$this->cronard = $this->data['cronard'];
}
if (is_array($data['events'] ?? false)) {
$this->events = $data['events'];
if (is_array($this->data['events'] ?? false)) {
$this->events = $this->data['events'];
}
if (is_array($data['cli'] ?? false)) {
$this->cli = $data['cli'];
if (is_array($this->data['cli'] ?? false)) {
$this->cli = $this->data['cli'];
}
if (is_array($this->data['taxus'] ?? false)) {
$this->taxus = $this->data['taxus'];
}
return $this;