承接 decodelabs/hatch 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

decodelabs/hatch

最新稳定版本:v0.1.5

Composer 安装命令:

composer require decodelabs/hatch

包简介

Simple code generation tools

README 文档

README

PHP from Packagist Latest Version Total Downloads GitHub Workflow Status PHPStan License

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

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-03-10