Development

- Fixed BootManager not loading.
- Optimised for-loops.
This commit is contained in:
Simon Sessingø
2016-11-25 02:27:46 +01:00
parent 7edee8e6d3
commit 2dd2d95af5
5 changed files with 16 additions and 13 deletions
+5 -5
View File
@@ -216,7 +216,7 @@ class Router
$max = count($this->bootManagers) - 1;
/* @var $manager IRouterBootManager */
for ($i = 0; $i < $max; $i++) {
for ($i = $max; $i >= 0; $i--) {
$manager = $this->bootManagers[$i];
@@ -345,10 +345,10 @@ class Router
*/
public function findRoute($name)
{
$max = count($this->processedRoutes);
$max = count($this->processedRoutes) - 1;
/* @var $route ILoadableRoute */
for ($i = 0; $i < $max; $i++) {
for ($i = $max; $i >= 0; $i--) {
$route = $this->processedRoutes[$i];
@@ -443,10 +443,10 @@ class Router
/* Loop through all the routes to see if we can find a match */
$max = count($this->processedRoutes);
$max = count($this->processedRoutes) - 1;
/* @var $route ILoadableRoute */
for ($i = 0; $i < $max; $i++) {
for ($i = $max; $i >= 0; $i--) {
$route = $this->processedRoutes[$i];