2 Commits
1.1 ... 1.2

Author SHA1 Message Date
User
d43d4751a7 20230818#2 2023-08-18 01:48:17 +03:00
User
c681f88de4 20230818#1 2023-08-18 01:42:24 +03:00
2 changed files with 1 additions and 16 deletions

View File

@@ -10,12 +10,5 @@ Stable version
composer require rmphp/kernel composer require rmphp/kernel
``` ```
```bash ```bash
composer require rmphp/kernel:"^1.1" composer require rmphp/kernel:"^1.0"
```
Dev version contains the latest changes
```bash
composer require rmphp/kernel:"1.1.x-dev"
``` ```

View File

@@ -157,11 +157,6 @@ class App extends Main {
if(is_file($this->baseDir."/".getenv("APP_NODES_FILE"))){ if(is_file($this->baseDir."/".getenv("APP_NODES_FILE"))){
$nodes = include_once $this->baseDir."/".getenv("APP_NODES_FILE"); $nodes = include_once $this->baseDir."/".getenv("APP_NODES_FILE");
} }
for ($appNodeNum = 1; getenv("APP_NODE".$appNodeNum); $appNodeNum++){
$nodesCollection[] = json_decode(getenv("APP_NODE".$appNodeNum), true);
}
if(isset($nodesCollection)) $nodes = $nodesCollection;
if(empty($nodes) || !is_array($nodes)) throw AppException::emptyAppNodes(); if(empty($nodes) || !is_array($nodes)) throw AppException::emptyAppNodes();
$this->getActions($nodes); $this->getActions($nodes);
} }
@@ -192,9 +187,6 @@ class App extends Main {
if(pathinfo($this->baseDir."/".$appNode['router'])['extension'] == "php") { if(pathinfo($this->baseDir."/".$appNode['router'])['extension'] == "php") {
$this->router->withRules(include_once $this->baseDir."/".$appNode['router']); $this->router->withRules(include_once $this->baseDir."/".$appNode['router']);
} }
elseif(pathinfo($this->baseDir."/".$appNode['router'])['extension'] == "json") {
$this->router->withRules(json_decode(file_get_contents($this->baseDir."/".$appNode['router']), true));
}
elseif(pathinfo($this->baseDir."/".$appNode['router'])['extension'] == "yaml") { elseif(pathinfo($this->baseDir."/".$appNode['router'])['extension'] == "yaml") {
$this->router->withRules(yaml_parse_file($this->baseDir."/".$appNode['router'])); $this->router->withRules(yaml_parse_file($this->baseDir."/".$appNode['router']));
} }