Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d43d4751a7 | ||
|
|
c681f88de4 |
@@ -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"
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -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']));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user