- 授权协议: BSD
- 开发语言: Hack
- 操作系统: Linux
- 软件首页: https://github.com/facebook/hack-codegen
- 软件文档: https://github.com/facebook/hack-codegen
- 官方下载: https://github.com/facebook/hack-codegen
软件介绍
Hack Codegen 是 Hack 代码生成工具,可以写入到已签名的文件,防止不期望的修改。Hack Codegen 的目的是提升抽象的层次,降低耦合。你可以用你自己的方式描述一个问题,然后生成相应的代码。
Hack Codegen 要求:
安装:
{
"require": {
"facebook/hack-codegen": "*"
}
}使用:
<?hh
require 'vendor/autoload.php';
echo codegen_file('HelloWorld.php')
->addClass(
codegen_class('HelloWorld')
->addMethod(
codegen_method('sayHi')
->setBody('echo "hello world\n";')
)
)->save();Hack Codegen 包括:
Hack_builder to deal with the concatenation
New lines
Indentation
Braces
Hack keywords
Collections
Signed files to re-generate code automatically when a schema is changed
UNIX 时间戳转换
UNIX 时间戳转换
HEX CMYK 转换工具
HEX CMYK 互转工具
