input->getArgument('name', null); if (empty($managerName)) { throw new Exception('文件名称不能为空~'); } $html = 'params = $params; return $this; } /** * @return array */ public function getParams() { return $this->params; } }'; $file = APP_PATH . 'app/Async/' . $managerName . '.php'; if (file_exists($file)) { throw new Exception('File exists.'); } Kiri::writeFile($file, $html); return [$managerName . '.php']; } }