<?php namespace nur\sery\wip\tools; use nur\sery\output\msg; use nur\sery\wip\app\app2; use nur\sery\wip\app\cli\Application; class SteamTrainApp extends Application { const TITLE = "Train à vapeur"; const USE_SIGNAL_HANDLER = true; const USE_LOGFILE = true; const USE_RUNFILE = true; const USE_RUNLOCK = true; const ARGS = [ "purpose" => self::TITLE, ]; function main() { $runfile = app2::get()->getRunfile(); $runfile->action("Running train...", 100); for ($i = 1; $i <= 100; $i++) { msg::print("Tchou-tchou! x $i"); $runfile->step(); sleep(1); } } }