]> git.andy128k.dev Git - ipf.git/commitdiff
fix routes command
authorAndrey Kutejko <andy128k@gmail.com>
Sun, 14 Jul 2013 09:37:37 +0000 (12:37 +0300)
committerAndrey Kutejko <andy128k@gmail.com>
Sun, 14 Jul 2013 09:37:37 +0000 (12:37 +0300)
ipf/command/routes.php
ipf/project.php

index acbbf85c551ecc34808fa003cbdf210b478c7c3a..ad57ee4f1110561e7d79ed5d8794bde4f9c018cc 100644 (file)
@@ -7,7 +7,7 @@ class IPF_Command_Routes
 
     public function run($args=null)
     {
-        $rows = IPF_Router::describe();
+        $rows = IPF_Project::getInstance()->router->describe();
         IPF_Shell::displayTwoColumns($rows);
     }
 }
index 37eb76410d09ff8e9c8b412ebaa65599ae4dd77f..d30aa488e38e9d677effaebdcf492d4573f5f569 100644 (file)
@@ -23,6 +23,7 @@ final class IPF_Project
                 throw new IPF_Exception_Panic("Application name \"$name\" is incorrect");
             $this->apps[$appname] = null;
         }
+        $this->router = new IPF_Router;
     }
 
     private function __clone()
@@ -97,7 +98,6 @@ final class IPF_Project
             $cli = new IPF_Cli;
             $cli->run();
         } else {
-            $this->router = new IPF_Router();
             $this->router->dispatch(IPF_HTTP_URL::getAction());
         }