From 229cbd24f511c2979a3b66a021e2bcdd5abb5b01 Mon Sep 17 00:00:00 2001
From: maks feltrin <pine3ree@gmail.com>
Date: Wed, 20 Aug 2014 13:59:42 +0200
Subject: [PATCH 1/2] replacing array_push with faster []

---
 flight/net/Route.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/flight/net/Route.php b/flight/net/Route.php
index 4603ed9..de063a2 100644
--- a/flight/net/Route.php
+++ b/flight/net/Route.php
@@ -74,7 +74,7 @@ class Route {
         // Wildcard or exact match
         if ($this->pattern === '*' || $this->pattern === $url) {
             if ($this->pass) {
-                array_push($this->params, $this);
+                $this->params[] = $this;
             }
             return true;
         }
@@ -114,7 +114,7 @@ class Route {
             }
 
             if ($this->pass) {
-                array_push($this->params, $this);
+                $this->params[] = $this;
             }
 
             $this->regex = $regex;
@@ -134,4 +134,4 @@ class Route {
     public function matchMethod($method) {
         return count(array_intersect(array($method, '*'), $this->methods)) > 0;
     }
-}
\ No newline at end of file
+}

From bcb5b120a9b8f42f02bf9ada7e956b208fe3d405 Mon Sep 17 00:00:00 2001
From: maks feltrin <pine3ree@gmail.com>
Date: Wed, 20 Aug 2014 14:00:59 +0200
Subject: [PATCH 2/2] Update Router.php

---
 flight/net/Router.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/flight/net/Router.php b/flight/net/Router.php
index 64313fc..dba9513 100644
--- a/flight/net/Router.php
+++ b/flight/net/Router.php
@@ -61,7 +61,7 @@ class Router {
             $methods = explode('|', $method);
         }
 
-        array_push($this->routes, new Route($url, $callback, $methods, $pass_route));
+        $this->routes[] = new Route($url, $callback, $methods, $pass_route);
     }
 
     /**