|
@@ -3,13 +3,13 @@
|
|
|
require_once('router.class.php');
|
|
|
require_once('response.class.php');
|
|
|
require_once('events.class.php');
|
|
|
- class App implements Base, Events {
|
|
|
+ class App extends Base implements Events {
|
|
|
private static $apps = array();
|
|
|
private $routers;
|
|
|
public function __construct($name){
|
|
|
$this->name = $name;
|
|
|
$this->routers = array();
|
|
|
- static::$apps[] $this;
|
|
|
+ static::$apps[] = $this;
|
|
|
}
|
|
|
public function __destruct(){
|
|
|
$this->routers = array();
|
|
@@ -68,7 +68,7 @@
|
|
|
}
|
|
|
public function create_router($type, $path){
|
|
|
$router = new Router();
|
|
|
- if(!isset($this->routers[$type]){
|
|
|
+ if(!isset($this->routers[$type])){
|
|
|
$this->routers[$type] = array();
|
|
|
}
|
|
|
$this->routers[$type][] = $router;
|