代码生成器

This commit is contained in:
JaguarJack
2020-04-28 22:02:03 +08:00
parent d044ac6d8a
commit 0b546a20be
12 changed files with 376 additions and 72 deletions

View File

@@ -1,5 +1,7 @@
<?php
namespace JaguarJack\Generator\Template;
namespace catcher\generate\template;
use catcher\base\CatchController;
class Controller
{
@@ -16,6 +18,7 @@ class Controller
return <<<TMP
use think\Request;
use catcher\CatchResponse;
use catcher\base\CatchController;
{USE}
@@ -48,7 +51,7 @@ TMP;
public function createClass($class)
{
return <<<TMP
class {$class}
class {$class} extends CatchController
{
{CONTENT}
}