From 7f1387e7d7ec342567f9aa44cc6f27e9e046ffca Mon Sep 17 00:00:00 2001 From: kohkimakimoto Date: Fri, 7 Feb 2014 17:49:13 +0900 Subject: [PATCH] Update --- src/Altax/Command/ServerCommand.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Altax/Command/ServerCommand.php b/src/Altax/Command/ServerCommand.php index 52b2b88..a5a933b 100644 --- a/src/Altax/Command/ServerCommand.php +++ b/src/Altax/Command/ServerCommand.php @@ -8,7 +8,11 @@ class ServerCommand extends \Altax\Command\Command { protected function configure() { - //$this->getConfig(); + $config = $this->getTaskConfig(); + + $host = isset($config["host"]) ? $config["host"] : '0.0.0.0'; + $port = isset($config["port"]) ? $config["port"] : 3000; + $script = isset($config["script"]) ? $config["script"] : ""; $this ->setDescription("Runs php builtin server.") @@ -17,20 +21,20 @@ protected function configure() null, InputOption::VALUE_OPTIONAL, 'The host address to serve the application on.', - '0.0.0.0' + $host ) ->addOption( 'port', null, InputOption::VALUE_OPTIONAL, 'The port to serve the application on.', - 3000 + $port ) ->addArgument( 'script', InputArgument::OPTIONAL, 'Router script of the server.', - '' + $script ) ; }