decodelabs/hatch
最新稳定版本:v0.1.5
Composer 安装命令:
composer require decodelabs/hatch
包简介
Simple code generation tools
README 文档
README
Simple code generation tools
Hatch provides a set of simple tools for generating PHP code.
Get news and updates on the DecodeLabs blog.
Installation
This package requires PHP 8.4 or higher.
Install via Composer:
composer require decodelabs/hatch
Usage
Static arrays
Export arrays of data for reuse as config files or static loadable datastructures.
use DecodeLabs\Hatch; $code = Hatch::exportStaticArray([ 'foo' => 'bar', 'baz' => 'qux', 'quux' => [ 'corge' => 'grault', 'garply' => 12, 'fred' => [ 'plugh' => 'xyzzy', 'thud' => [1, 2, 3] ] ] ]); echo $code;
This will output:
[
'foo' => 'bar',
'baz' => 'qux',
'quux' => [
'corge' => 'grault',
'garply' => 12,
'fred' => [
'plugh' => 'xyzzy',
'thud' => [1, 2, 3]
]
]
]
Licensing
Hatch is licensed under the MIT License. See LICENSE for the full license text.
统计信息
- 总下载量: 3.39k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-10