Skip to content

Commit e5eeee8

Browse files
committed
Updates the init applicaiton, package manager, and router abstract
1 parent 901ded2 commit e5eeee8

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

app/init/controller/init.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ public function route()
2929
} else {
3030
$this->route404();
3131
}
32-
3332
}
3433

3534
public function index()

system/abstract/router.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ private function route404()
5353
*/
5454
private function setRoutes($routes)
5555
{
56-
if (is_array($routes)) $this->routes = $routes;
56+
if (is_array($routes))
57+
{
58+
$this->routes = $routes;
59+
return true;
60+
}
5761
return false;
5862
}
5963

system/core/package.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ public function __construct()
2424
$this->packages = array(
2525
'bootstrap' => array(
2626
'js' => array(
27-
'file1'
27+
'public/components/bootstrap/dist/js/bootstrap.min.js'
2828
),
2929
'css' => array(
30-
'file1'
30+
'public/components/bootstrap/dist/css/bootstrap.min.css'
3131
)
3232
),
3333
'jquery' => array(
@@ -96,7 +96,8 @@ public function __construct()
9696
*/
9797
public function getPackage($name)
9898
{
99-
99+
if (isset($this->packages[$name])) return $this->packages[$name];
100+
return false;
100101
}
101102

102103
/**
@@ -107,7 +108,7 @@ public function getPackage($name)
107108
*/
108109
public function addPackage($name, array $package)
109110
{
110-
111+
$this->packages[$name] = $package;
111112
}
112113

113114
/**

0 commit comments

Comments
 (0)