params[$key] = $value; $this->writeln(" ** {$key} = {$value}"); } protected function configure(array $config) { $this->addCommand("set", [$this,"setParam"]); $this->addCommand("exit", [$this,"stop"]); } protected function getPrompt() { return "flinger: "; } protected function onUpdate() { static $lt; $t = floor(microtime(true)); if ($t > $lt) { $lt = $t + 5; echo date("Y-m-d h:i:s")."\n"; } } protected function onInput($buffer) { } } $myShell = new MyShell(); $myShell->run();