- Added the application feature - a big reason why Lean was created in the first place.
- Began moving some repetitive parts from projects to projects into lean
This commit is contained in:
1 parent
4bd68a74f8
commit
bdb9f7f732
13 files changed
+571
-2
No files matched your search
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace Lean;
|
||||
|
||||
|
||||
class Application
|
||||
{
|
||||
public string $piceaContext;
|
||||
|
||||
public array $views;
|
||||
|
||||
public array $routes;
|
||||
|
||||
public array $entities;
|
||||
|
||||
public array $tellJson;
|
||||
|
||||
public array $tellPhp;
|
||||
|
||||
public function fromArray(array $data) : self
|
||||
{
|
||||
if (is_array($picea = $data['picea'] ?? false)) {
|
||||
if ($picea['context'] ?? false ) {
|
||||
$this->piceaContext = $picea['context'];
|
||||
}
|
||||
|
||||
if ($picea['view'] ?? false) {
|
||||
$this->views = $picea['view'];
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array($ulmus = $data['ulmus'] ?? false)) {
|
||||
if ($ulmus['entities'] ?? false) {
|
||||
$this->entities = $ulmus['entities'];
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array($tell = $data['tell'] ?? false)) {
|
||||
if ($tell['json'] ?? false) {
|
||||
$this->tellJson = $tell['json'];
|
||||
}
|
||||
|
||||
if ($tell['php'] ?? false) {
|
||||
$this->tellPhp = $tell['php'];
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array($routes = $data['routes'] ?? false)) {
|
||||
$this->routes = $data['routes'];
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user