]> git.andy128k.dev Git - ipf.git/commitdiff
fixes
authorAndrey Kutejko <andy128k@gmail.com>
Sat, 27 Dec 2014 21:55:30 +0000 (23:55 +0200)
committerAndrey Kutejko <andy128k@gmail.com>
Sat, 27 Dec 2014 21:55:30 +0000 (23:55 +0200)
ipf/middleware/error.php
ipf/router.php

index b69dca5b01199c1075485c4d2df9af333488d981..69ba10143f2536bc2d32388e1886765cfca9ea5a 100644 (file)
@@ -11,7 +11,7 @@ class IPF_Error_Middleware extends IPF_Middleware
             }
 
             if (!($response instanceof IPF_HTTP_Response)) {
-                throw new \Exception('Response in not a IPF_HTTP_Response');
+                throw new \Exception('Response is not a IPF_HTTP_Response');
             }
 
             return $response;
index 5e1347c6a6bcad69aead1e60933fee4ce1564ec2..22d585457d6e91beeb41187262a075862faa282d 100644 (file)
@@ -16,8 +16,8 @@ class IPF_Router
 
             if (isset($route['urls'])) {
                 $nested = \PFF\Arr::pop($route, 'urls');
-                $prefix .= \PFF\Arr::pop($route, 'prefix', '');
-                $this->flattenRoutes($nested, $prefix, $route);
+                $p = $prefix . \PFF\Arr::pop($route, 'prefix', '');
+                $this->flattenRoutes($nested, $p, $route);
             } elseif (isset($route['regex'])) {
                 $this->routes[] = new IPF_Route($prefix . $route['regex'], 'IPF_Router_RegexMatch', $route);
             } elseif (isset($route['expr'])) {
@@ -45,14 +45,14 @@ class IPF_Router
         foreach ($this->routes as $route) {
             $result[] = array(
                 $route->expr,
-                $route->func,
+                $route->controller() . '#' . $route->action(),
             );
         }
         return $result;
     }
 
     public function reverse($view, $params=array())
-    { 
+    {
         foreach ($this->routes as $route)
             if ($route->routesTo($view))
                 return IPF::get('app_base') . $route->matcher()->reverse($params);