Lumen 快速开发工具包  v1.2.2
ControllerCreator类 参考

Public 成员函数

 __construct ($name, $table_name, $files=null)
 
 create ($model, $transformer_name)
 
 getPath ($name)
 
 getStub ()
 
 buildBluePrint ($fields=[])
 

Protected 成员函数

 replace ($stub, $name, $model, $transformer_name)
 
 getNamespace ($name)
 
 replaceClass ($stub, $name)
 

Protected 属性

 $name
 
 $bluePrintForm = ''
 
 $bluePrintJson = ''
 
 $bluePrintTitle = ''
 
 $bluePrintStoreRule = ''
 
 $bluePrintUpdateRule = ''
 
 $files
 
 $tableName
 

构造及析构函数说明

◆ __construct()

__construct (   $name,
  $table_name,
  $files = null 
)

ControllerCreator constructor.

参数
string$name
null$files

成员函数说明

◆ buildBluePrint()

buildBluePrint (   $fields = [])

Build the table blueprint.

参数
array$fields
异常

◆ create()

create (   $model,
  $transformer_name 
)

Create a controller.

参数
string$model
string$transformer_name
异常

引用了 Fxiao\LumenTools\$model, ControllerCreator\getStub() , 以及 ControllerCreator\replace().

函数调用图:

◆ getNamespace()

getNamespace (   $name)
protected

Get controller namespace from giving name.

参数
string$name
返回
string

被这些函数引用 ControllerCreator\replaceClass().

这是这个函数的调用关系图:

◆ getPath()

getPath (   $name)

Get file path from giving controller name.

参数
$name
返回
string

◆ getStub()

getStub ( )

Get stub file path.

返回
string

被这些函数引用 ControllerCreator\create().

这是这个函数的调用关系图:

◆ replace()

replace (   $stub,
  $name,
  $model,
  $transformer_name 
)
protected
参数
string$stub
string$name
string$model
返回
string

引用了 Fxiao\LumenTools\$model , 以及 ControllerCreator\replaceClass().

被这些函数引用 ControllerCreator\create().

函数调用图:
这是这个函数的调用关系图:

◆ replaceClass()

replaceClass (   $stub,
  $name 
)
protected

Replace the class name for the given stub.

参数
string$stub
string$name
返回
string

引用了 ControllerCreator\getNamespace().

被这些函数引用 ControllerCreator\replace().

函数调用图:
这是这个函数的调用关系图:

该类的文档由以下文件生成: