From: Andrey Kutejko Date: Sun, 14 Jul 2013 09:37:37 +0000 (+0300) Subject: fix routes command X-Git-Tag: 0.5~170 X-Git-Url: https://git.andy128k.dev/?a=commitdiff_plain;h=4efe002f39e151afb20ccf8afb1c0701a86c0083;p=ipf.git fix routes command --- diff --git a/ipf/command/routes.php b/ipf/command/routes.php index acbbf85..ad57ee4 100644 --- a/ipf/command/routes.php +++ b/ipf/command/routes.php @@ -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); } } diff --git a/ipf/project.php b/ipf/project.php index 37eb764..d30aa48 100644 --- a/ipf/project.php +++ b/ipf/project.php @@ -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()); }