library generator
FastD generator
fastd/generator
FastD generator
- Saturday, July 23, 2016
- by JanHuang
- Repository
- 1 Watchers
- 1 Stars
- 761 Installations
- PHP
- 1 Dependents
- 0 Suggesters
- 1 Forks
- 0 Open issues
- 7 Versions
- 1 % Grown
generator
一个写了好像没什么用的东西, 主要辅助命令行等其他工具做一个自动生成的工作., (*1)
要求
php >= 7, (*2)
composer
{
"fastd/generator": "~1.1.0"
}
生成对象
// include composer
$generator = new \FastD\Generator\Generator('Test');
echo $generator->output();
FastD\Generator\Generator
构造方法接受三个参数,第一个是类名,第二个是命名空间,第三个是对象类型: 普通对象,抽象类,接口,可以通过 FastD\Generator\Factory\Object::OBJECT_CLASS
, FastD\Generator\Factory\Object::OBJECT_ABSTRACT
, FastD\Generator\Factory\Object::OBJECT_INTERFACE
分别控制., (*3)
具体请看: Testing, (*4)
输出
class Test { }
生成文件
// include composer
$generator = new \FastD\Generator\Generator('Test');
echo $generator->save(__DIR__ . '/save/Test.php');
返回生成的最终信息, (*5)
不写了,具体看 测试用例., (*6)
好像瞎折腾了., (*7)
License MIT
1.1.x-dev
1.1.9999999.9999999-dev
FastD generator
Sources
Download
MIT
The Requires
The Development Requires
by
JanHuang
dev-master
9999999-dev
FastD generator
Sources
Download
MIT
The Requires
The Development Requires
by
JanHuang
v1.1.1
1.1.1.0
FastD generator
Sources
Download
MIT
The Requires
The Development Requires
by
JanHuang
v1.1.0
1.1.0.0
FastD generator
Sources
Download
MIT
The Requires
The Development Requires
by
JanHuang
1.0.x-dev
1.0.9999999.9999999-dev
FastD generator
Sources
Download
MIT
The Requires
The Development Requires
by
JanHuang
v1.0.1
1.0.1.0
FastD generator
Sources
Download
MIT
The Requires
The Development Requires
by
JanHuang
v1.0.0
1.0.0.0
FastD generator
Sources
Download
MIT
The Requires
The Development Requires
by
JanHuang