decodelabs/iota
最新稳定版本:v0.3.2
Composer 安装命令:
composer require decodelabs/iota
包简介
Discrete, dependable generated code repository
README 文档
README
Discrete, dependable generated code repository
Iota provides a simple mechanism for storing, retrieving and loading generated code.
Installation
This package requires PHP 8.4 or higher.
Install via Composer:
composer require decodelabs/iota
Usage
Load a repository:
use DecodeLabs\Iota; // Get service $iota = new Iota(); // Load manually $repo = $iota->load('name', '/path/to/repo'); // Load an app-level repository only writable in dev mode $repo = $iota->loadStatic('name'); // Load a writable app-level repository $repo = $iota->loadDynamic('name');
Then you can store and retrieve code:
// Store anything $repo->store( 'key', <<<'PHP' <?php return 'Hello, world!'; PHP ); // Retrieve code $code = $repo->fetch('key'); // Include quietly $repo->include('key'); // Include and return $value = $repo->Return('key'); // 'Hello, world!'
Licensing
Iota is licensed under the MIT License. See LICENSE for the full license text.
统计信息
- 总下载量: 3.39k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-06