public function run() { $this->project = new WindGenerateProject(); $this->project->name = 'test'; $this->project->dir = Wind::getRealDir('PROJ:' . $this->project->name); $this->project->setConfig($this->config); $r = $this->project->generate(); if (!$r) { echo 'generate fail'; } else { echo 'generate success'; } }
public function run($projName = 'test') { list($projName, $dir) = $this->_checkDir($projName); $this->project = new WindGenerateProject(); $this->chooseMode(); $this->project->name = $projName; $this->project->dir = $dir; $result = $this->project->generate(); if ($result === false) { $this->setOutput(<<<EOB Generate Project {$projName} fail! The possible reason : write file failed.\t\t\t\t EOB ); } else { $this->setOutput(<<<EOT Generate Project {$projName} success! You can find it under {$this->project->dir} EOT ); } }